{"id":23618880,"url":"https://github.com/xavierog/pecoregex","last_synced_at":"2026-02-11T19:33:11.089Z","repository":{"id":57451593,"uuid":"410351084","full_name":"xavierog/pecoregex","owner":"xavierog","description":"Evaluate Perl-Compatible Regular Expressions from Python","archived":false,"fork":false,"pushed_at":"2025-01-04T18:16:29.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T12:58:36.237Z","etag":null,"topics":["cli","ctypes","json","pcre","python","regex","yaml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xavierog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2021-09-25T18:25:39.000Z","updated_at":"2025-01-04T18:16:32.000Z","dependencies_parsed_at":"2024-12-27T19:33:11.526Z","dependency_job_id":"e647f60e-58a5-4eb5-bd78-69245884d44c","html_url":"https://github.com/xavierog/pecoregex","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"47dc20736979cabd04dab88a93d5ee8372711059"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fpecoregex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fpecoregex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fpecoregex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fpecoregex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xavierog","download_url":"https://codeload.github.com/xavierog/pecoregex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085277,"owners_count":21045138,"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":["cli","ctypes","json","pcre","python","regex","yaml"],"created_at":"2024-12-27T19:32:55.893Z","updated_at":"2026-02-11T19:33:06.059Z","avatar_url":"https://github.com/xavierog.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PECOREGEX\n\nPecoregex stands for Perl-Compatible Regular Expression, better known as PCRE.\nPecoregex is [python-pcre](https://github.com/awahlig/python-pcre)'s weird little cousin: like python-pcre, pecoregex\nacts as a bridge between Python and libpcre.\n\nThe key differences are:\n\n- pecoregex relies on ctypes to load and leverage libpcre.so; consequently, it can be installed without compiling\n  anything;\n\n- pecoregex only provides access to the most essential features of libpcre: compiling and executing regexes (including\n  retrieving captures); other features such as study(), JIT or sub() were not considered (yet?).\n\n## Modules\n\nThe pecoregex package provides multiple modules:\n\n- pecoregex.pcre provides PCRE\\_\\* constants and the PCRELibrary class; this is the part that actually interacts with\n  libpcre.so; it can be used directly or through the other modules that build upon it;\n\n- pecoregex.document defines key names for the Pecoregex document format; Pecoregex documents are a way to bundle 1 to n\n  PCRE patterns along with 0 to n subjects each.\n\n- pecoregex.factory provides helpers to build common Pecoregex documents (e.g. \"1 subject, n patterns\" documents);\n\n- pecoregex.util provides functions to process Pecoregex documents, i.e. compile the PCRE patterns they contain and\n  match their associated subject strings against them;\n\n- pecoregex.cli is typically invoked through the `pecoregex` CLI tool; it provides a mean to compile and execute PCRE\n  patterns: patterns and subjects are provided either as command-line arguments or by passing a Pecoregex document on\n  the standard input (as JSON or YAML); supported output formats include text, JSON and YAML; therefore, it is perfectly\n  possible to compile and execute multiple PCRE patterns and subjects before picking up their captures using `jq`.\n\n- pecoregex.extproc provides simple subprocess-based wrappers that leverage pecoregex.cli to compile and execute PCRE\n  patterns in a separate process; this is meant for all those who consider calling C functions from Python as a threat\n  to the reliability of their program.\n\n## License\nThis Python package and its modules are released under the 3-clause BSD license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavierog%2Fpecoregex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxavierog%2Fpecoregex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavierog%2Fpecoregex/lists"}