{"id":21327528,"url":"https://github.com/jille/deregexp","last_synced_at":"2025-03-16T00:14:08.408Z","repository":{"id":57518206,"uuid":"247820819","full_name":"Jille/deregexp","owner":"Jille","description":"Deregexp deconstructs a regexp to an expression with substring filters.","archived":false,"fork":false,"pushed_at":"2020-11-27T12:52:02.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T12:45:49.226Z","etag":null,"topics":["deconstructor","golang","regexp"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/Jille.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}},"created_at":"2020-03-16T21:34:56.000Z","updated_at":"2020-08-13T16:38:07.000Z","dependencies_parsed_at":"2022-09-26T18:01:38.379Z","dependency_job_id":null,"html_url":"https://github.com/Jille/deregexp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jille%2Fderegexp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jille%2Fderegexp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jille%2Fderegexp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jille%2Fderegexp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jille","download_url":"https://codeload.github.com/Jille/deregexp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806073,"owners_count":20350775,"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":["deconstructor","golang","regexp"],"created_at":"2024-11-21T21:18:04.456Z","updated_at":"2025-03-16T00:14:08.387Z","avatar_url":"https://github.com/Jille.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deregexp\n\n[![GoDoc](https://godoc.org/github.com/Jille/deregexp?status.svg)](https://godoc.org/github.com/Jille/deregexp)\n[![Build Status](https://travis-ci.org/Jille/deregexp.png)](https://travis-ci.org/Jille/deregexp)\n\nDeregexp converts a regexp to an expression with substring matches. This expression does not express exactly the same as the regexp, but a superset. It can be used for a cheap first pass filter, or for index lookups.\n\n## Examples\n\n```shell\n$ go run cmd/test/test.go \"Mary.+had.+a.+little.+(lamb|sheep)\"\n\"little\" AND \"Mary\" AND \"had\" AND (\"sheep\" OR \"lamb\")\n```\n\nNote that the \"a\" has been dropped because it is implied by \"Mary\" and \"had\".\n\n```shell\n$ go run cmd/test/test.go \"Mary.+had.+(a|no).+little.+(lamb|sheep)\"\n\"little\" AND \"Mary\" AND \"had\" AND (\"sheep\" OR \"lamb\")\n```\n\nNote that the \"(a|no)\" has been dropped because the \"a\" is implied by \"Mary\" and \"had\", and `(TRUE OR \"no\")` is always true.\n\n## Known limitations\n\nCase insensitivity is not supported. You can of course use the resulting expression case insensitively, but controlling case sensitivity with `(?i)` is not supported. Patches are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjille%2Fderegexp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjille%2Fderegexp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjille%2Fderegexp/lists"}