{"id":19338208,"url":"https://github.com/jserv/cregex","last_synced_at":"2025-06-29T23:32:31.904Z","repository":{"id":146557107,"uuid":"326461913","full_name":"jserv/cregex","owner":"jserv","description":"A small implementation of regular expression matching engine in C","archived":false,"fork":false,"pushed_at":"2021-01-04T16:08:02.000Z","size":30,"stargazers_count":87,"open_issues_count":0,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-24T18:59:25.875Z","etag":null,"topics":["regex","regexp","regular-expression"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jserv.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}},"created_at":"2021-01-03T17:24:08.000Z","updated_at":"2024-10-13T09:53:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"14d4d478-ecdb-4251-a188-0cbe3d318731","html_url":"https://github.com/jserv/cregex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jserv/cregex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Fcregex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Fcregex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Fcregex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Fcregex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jserv","download_url":"https://codeload.github.com/jserv/cregex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jserv%2Fcregex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262685116,"owners_count":23348409,"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":["regex","regexp","regular-expression"],"created_at":"2024-11-10T03:16:41.663Z","updated_at":"2025-06-29T23:32:31.853Z","avatar_url":"https://github.com/jserv.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cregex\n\n`cregex` is a compact implementation of [regular expression](https://en.wikipedia.org/wiki/Regular_expression)\n(regex) matching engine in C. Its design was inspired by Rob Pike's regex-code for the book \"Beautiful Code\"\n[available online here](https://www.cs.princeton.edu/courses/archive/spr09/cos333/beautiful.html).\nIt is based on two papers by Russ Cox:\n* [Regular Expression Matching Can Be Simple And Fast](https://swtch.com/~rsc/regexp/regexp1.html)\n* [Regular Expression Matching: the Virtual Machine Approach](https://swtch.com/~rsc/regexp/regexp2.html)\n\n`cregex` supports a subset of the syntax and semantics of the [POSIX Basic Regular Expressions](https://www.regular-expressions.info/posix.html).\nThe main design goal of `cregex` is to be small, correct, self contained and\nuse few resources while retaining acceptable performance and feature completeness.\n\n## Features\n\n* `^` and `$` anchors\n* `.` match any single character\n* `[...]` and `[^...]` character classes\n* `?`, `*`, `+`, and `{x,y}` greedy quantifiers\n* `??`, `*?`, `+?`, and `{x,y}?` non-greedy quantifiers\n* `(...)` capturing groups\n\n## Build and Test\n\nSimply run to build the library and test programs.\n```shell\n$ make\n```\n\nRun the tests from Go distribution.\n```shell\n$ make check\n```\n\nVisualize the regular expressions with [Graphviz](https://graphviz.org/).\n```shell\n$ tests/re2dot \"(a*)(b{0,1})(b{1,})b{3}\" | dot -Tpng -o out.png\n```\n\n## License\n\n`cregex` is freely redistributable under the BSD 2 clause license.\nUse of this source code is governed by a BSD-style license that can be found in the `LICENSE` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjserv%2Fcregex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjserv%2Fcregex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjserv%2Fcregex/lists"}