{"id":16647130,"url":"https://github.com/michaelrsweet/abnf","last_synced_at":"2025-04-09T16:17:06.827Z","repository":{"id":143286284,"uuid":"83320254","full_name":"michaelrsweet/abnf","owner":"michaelrsweet","description":"ABNF to REGEX Library","archived":false,"fork":false,"pushed_at":"2024-09-27T17:32:41.000Z","size":23,"stargazers_count":19,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T16:16:56.138Z","etag":null,"topics":["abnf","abnf-regex","php","regular-expression"],"latest_commit_sha":null,"homepage":"https://michaelrsweet.github.io/abnf","language":"PHP","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/michaelrsweet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-02-27T14:39:41.000Z","updated_at":"2024-09-27T17:32:44.000Z","dependencies_parsed_at":"2025-02-15T10:32:03.142Z","dependency_job_id":"1b94484a-de45-472a-9985-9519231b7422","html_url":"https://github.com/michaelrsweet/abnf","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelrsweet%2Fabnf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelrsweet%2Fabnf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelrsweet%2Fabnf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelrsweet%2Fabnf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelrsweet","download_url":"https://codeload.github.com/michaelrsweet/abnf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065285,"owners_count":21041872,"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":["abnf","abnf-regex","php","regular-expression"],"created_at":"2024-10-12T08:43:55.761Z","updated_at":"2025-04-09T16:17:06.804Z","avatar_url":"https://github.com/michaelrsweet.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ABNF to REGEX Library\n\nThe ABNF to REGEX library is a pair of PHP functions that validate standard\nABNF (RFC 5234) input and generate POSIX and Perl-compatible regular\nexpressions for use in schema and applications.\n\nI provide an online form front-end for these functions at:\n\n    http://abnf.msweet.org/\n\nThe file \"example.php\" shows how to implement your own web form.\n\n\n## Functions\n\n### abnf_load(string)\n\nThis function parses the ABNF contained in the supplied string. On success, it\nreturns an array of rules that can be passed to the \"abnf_regex\" function.\n\nFALSE is returned on failure, with the following global variables describing\nthe issue:\n\n- \"abnf_error\" contains a string describing the issue.\n- \"abnf_errorline\" contains the line number in the string where the issue occurred.\n- \"abnf_errorcol\" contains the column number in the string where the issue occurred.\n\n### abnf_regex(rules, rulename, mode = ABNF_INSENSITIVE)\n\nThis function generates a regular expression for the named rule. If the named\nrule does not exist, an empty string is returned.\n\nThe \"mode\" parameter can be any of the following constants:\n\n- ABNF_INSENSITIVE : Generates a case-insensitive regular expression.\n- ABNF_SENSITIVE : Generates a case-sensitive regular expression.\n- ABNF_LOWERCASE : Generates a case-sensitive regular expression with all string literals converted to uppercase.\n- ABNF_UPPERCASE : Generates a case-sensitive regular expression with all string literals converted to lowercase.\n\n\n## Legal Stuff\n\nCopyright (c) 2013-2024 Michael R Sweet\n\nThis software is provided under the terms of the MIT license, which is provided\nin the file \"LICENSE.md\".\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelrsweet%2Fabnf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelrsweet%2Fabnf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelrsweet%2Fabnf/lists"}