{"id":16138148,"url":"https://github.com/luckasranarison/regex-potata","last_synced_at":"2025-04-06T17:23:54.552Z","repository":{"id":213252625,"uuid":"733412533","full_name":"luckasRanarison/regex-potata","owner":"luckasRanarison","description":"Potata regex engine","archived":false,"fork":false,"pushed_at":"2024-03-31T06:55:24.000Z","size":273,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T04:04:56.173Z","etag":null,"topics":["automata-theory","nfa","regex-engine","thompson-construction"],"latest_commit_sha":null,"homepage":"https://luckasranarison.github.io/regex-potata/","language":"Rust","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/luckasRanarison.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":"2023-12-19T09:17:56.000Z","updated_at":"2024-01-13T10:07:54.000Z","dependencies_parsed_at":"2024-03-31T07:34:12.111Z","dependency_job_id":"b1e6d4a6-80c0-4a1b-9d9b-9c71924efe56","html_url":"https://github.com/luckasRanarison/regex-potata","commit_stats":null,"previous_names":["luckasranarison/regex-potata"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckasRanarison%2Fregex-potata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckasRanarison%2Fregex-potata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckasRanarison%2Fregex-potata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckasRanarison%2Fregex-potata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luckasRanarison","download_url":"https://codeload.github.com/luckasRanarison/regex-potata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247519167,"owners_count":20951931,"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":["automata-theory","nfa","regex-engine","thompson-construction"],"created_at":"2024-10-09T23:32:29.507Z","updated_at":"2025-04-06T17:23:54.524Z","avatar_url":"https://github.com/luckasRanarison.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regex-potata\n\nA basic regex engine, built as a practical application of automata theory, implements an E-NFA using Thompson construction and BFS for NFA simulation.\n\n## Usage\n\n```rust\nuse regex_potata::Regex;\n\nfn main() {\n    let re = Regex::new(\"hello (w|w)orld!*\").unwrap();\n    let result = re.test(\"hello world!!!\");\n\n    println!(\"{}\", result); // true\n\n    let re = Regex::new(r#\"(?\u003cday\u003e\\d{2})-(?\u003cmonth\u003e\\d{2})-(?\u003cyear\u003e\\d{4})\"#).unwrap();\n    let captures = re.captures(\"07-01-2024\").unwrap();\n\n    println!(\"{:?}\", captures.get_name(\"day\"));\n    println!(\"{:?}\", captures.get_name(\"month\"));\n    println!(\"{:?}\", captures.get_name(\"year\"));\n\n    let re = Regex::new(\"(T|t)h(e|(e|o)se)\").unwrap();\n    let matches = re.find_all(\"the These those The\");\n\n    println!(\"{:?}\", matches);\n}\n```\n\n## TODOs\n\n- [x] Basic regex `foo` `(bar)` `|` `.`\n- [x] Quantifiers `+` `?` `*` `{x}` `{x,y}` `{x,}`\n- [x] Character classes `[a-z]` `[^x]` `\\d` `\\D` `\\w` `\\W` `\\s` `\\S`\n- [x] Captures `(foo)` `(:?bar)` `(?\u003cnamed\u003efoo)`\n- [ ] Anchors `^` `$`\n- [ ] NFA visualizer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluckasranarison%2Fregex-potata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluckasranarison%2Fregex-potata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluckasranarison%2Fregex-potata/lists"}