{"id":20163487,"url":"https://github.com/sjinks/pcre2pp","last_synced_at":"2025-10-25T13:02:01.852Z","repository":{"id":77874284,"uuid":"99546321","full_name":"sjinks/pcre2pp","owner":"sjinks","description":"C++ interface to PCRE2 library compatible with \u003cregex\u003e","archived":false,"fork":false,"pushed_at":"2017-11-15T17:54:42.000Z","size":1132,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-13T14:22:14.597Z","etag":null,"topics":["cxx","cxx11","pcre2","regex","regular-expressions"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjinks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://www.paypal.com/donate/?hosted_button_id=SAG6877JDJ3KU","https://send.monobank.ua/jar/7rosVfiwKM"]}},"created_at":"2017-08-07T06:52:13.000Z","updated_at":"2023-09-26T09:10:21.000Z","dependencies_parsed_at":"2023-02-28T08:00:50.531Z","dependency_job_id":null,"html_url":"https://github.com/sjinks/pcre2pp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjinks%2Fpcre2pp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjinks%2Fpcre2pp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjinks%2Fpcre2pp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjinks%2Fpcre2pp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjinks","download_url":"https://codeload.github.com/sjinks/pcre2pp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241600493,"owners_count":19988715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cxx","cxx11","pcre2","regex","regular-expressions"],"created_at":"2024-11-14T00:29:46.947Z","updated_at":"2025-10-25T13:01:56.820Z","avatar_url":"https://github.com/sjinks.png","language":"C++","funding_links":["https://www.paypal.com/donate/?hosted_button_id=SAG6877JDJ3KU","https://send.monobank.ua/jar/7rosVfiwKM"],"categories":[],"sub_categories":[],"readme":"# pcre2pp\n\n[![Build Status](https://travis-ci.org/sjinks/pcre2pp.svg?branch=master)](https://travis-ci.org/sjinks/pcre2pp)\n[![codecov](https://codecov.io/gh/sjinks/pcre2pp/branch/master/graph/badge.svg)](https://codecov.io/gh/sjinks/pcre2pp)\n\nC++ interface to PCRE2 library compatible with \u0026lt;regex\u003e\n\nSee:\n  * [cppreference.com — Regular expressions library](http://en.cppreference.com/w/cpp/regex)\n  * [Perl-compatible Regular Expressions](http://www.pcre.org/current/doc/html/)\n\nThis header-only library implements \n[std::basic_regex](http://en.cppreference.com/w/cpp/regex/basic_regex),\n[std::sub_match](http://en.cppreference.com/w/cpp/regex/sub_match),\n[std::match_results](http://en.cppreference.com/w/cpp/regex/match_results),\n[std::regex_match](http://en.cppreference.com/w/cpp/regex/regex_match),\n[std::regex_search](http://en.cppreference.com/w/cpp/regex/regex_search),\n[std::regex_replace](http://en.cppreference.com/w/cpp/regex/regex_replace),\n[std::regex_iterator](http://en.cppreference.com/w/cpp/regex/regex_iterator),\n[std::regex_token_iterator](http://en.cppreference.com/w/cpp/regex/regex_token_iterator), and\n[std::regex_error](http://en.cppreference.com/w/cpp/regex/regex_error)\ninterfaces for the PCRE2 library.\n\n**Unsupported features:**\n  * `regex_traits`: collation is performed by the PCRE library itself, and there is no way to affect its behavior\n  * `regex_constants::syntax_option_type::ECMAScript`, `regex_constants::syntax_option_type::basic`,\n  `regex_constants::syntax_option_type::extended`, `regex_constants::syntax_option_type::awk`,\n  `regex_constants::syntax_option_type::grep`, `regex_constants::syntax_option_type::egrep` are not supported for\n  obvious reasons: if you need another matching engine, there is no need to use PCRE :-)\n  * `regex_constants::match_flag_type::match_not_bow`, `regex_constants::match_flag_type::match_not_eow`: these\n  features are not supported by PCRE\n  * `regex_constants::match_flag_type::match_any` is always on (its description says: \"If more than one match\n  is possible, then any match is an acceptable result\"; I believe this is always true for PCRE)\n  * `regex_constants::match_flag_type::match_prev_avail`: if I get the description right, you can just unset\n  `regex_constants::match_flag_type::match_not_bol` flag\n  * `pcre2::regex_constants::error_type` and `std::regex_constants::error_type` constants are different:\n  PCRE2 does not officially provides constants for compilation errors (only for match errors), and therefore there is\n  no portable way to match PCRE2 errors to std::regex_constants::error_type; in addition, PCRE2 returns much more\n  possible errors than stdc++\n  * `std::wregex`, `std::wcsub_match`, `std::wssub_match`, `std::wcmatch`, `std::wsmatch`, `std::wcregex_iterator`,\n  `std::wsregex_iterator`, `std::wcregex_token_iterator`, and `std::wsregex_token_iterator` are not supported:\n  the size of `wchar_t` differes across platforms, which makes it unsuitable for PCRE (however, the library does provide\n  `pcre2::regex16`, `pcre2::regex32`, `pcre2::c16sub_match`, `pcre2::c32sub_match`, `pcre2::c16match`, `pcre2::c32match`,\n  `pcre2::s16match`, `pcre2::s32match`, `pcre2::c16regex_iterator`, `pcre2::c32regex_iterator`, `pcre2::s16regex_iterator`,\n  `pcre2::s32regex_iterator`, `pcre2::c16regex_token_iterator`, `pcre2::c32regex_token_iterator`, `pcre2::s16regex_token_iterator`,\n  `pcre2::s32regex_token_iterator` for `char16_t`/`std::u16string` and `char32_t`/`std::u32string` types)\n  \n**NB:** `char16_t`/`char32_t` are supported only if `sizeof(char16_t) == 2` and `sizeof(char32_t) == 4` (the standard says that\n`char16_t` (`char32_t`) has the same size as `std::uint_least16_t` (`std::uint_least32_t`) type, and their size may be more\nthan 2 (4) bytes).\n  \n**Differences from stdc++:**\n  * `regex_constants::match_flag_type::format_sed` behaves differently than in libstdc++: as far as I can tell,\n  libstdc++ does not handle [sed rules](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html#tag_20_116_13_03)\n  properly: there is no way to escape `\u0026` or `\\\u003cdigit\u003e` in the format pattern. PCRE2++, however, follows the rules\n  [more strictly](https://github.com/sjinks/pcre2pp/blob/master/test/match_results.cpp#L19)\n  * new option: `regex_constants::utf`: causes PCRE2 to regard both the pattern and the subject strings that are\n  subsequently processed as strings of UTF characters instead of single-code-unit strings\n  * new option: `regex_constants::ucp`: changes the way PCRE2 processes \\B, \\b, \\D, \\d, \\S, \\s, \\W, \\w, and some of the POSIX\n  character classes. By default, only ASCII characters are recognized, but when this option is set, Unicode properties are used\n  instead to classify characters\n\nThe library depends upon `pcre2.h` header file (provided by `libpcre2-dev` package in Ubuntu).\n\n8-bit features require linking in `pcre2-8` library (`libpcre2-8-0` package in Ubuntu).\n16-bit features require linking in `pcre2-16` library (`libpcre2-16-0` package in Ubuntu).\n32-bit features require linking in `pcre2-32` library (`libpcre2-32-0` package in Ubuntu).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjinks%2Fpcre2pp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjinks%2Fpcre2pp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjinks%2Fpcre2pp/lists"}