{"id":19640373,"url":"https://github.com/kentnl/regexp-grammars-common-string","last_synced_at":"2025-02-26T22:44:46.879Z","repository":{"id":1257582,"uuid":"1196361","full_name":"kentnl/Regexp-Grammars-Common-String","owner":"kentnl","description":"Some basic String parsing Rules for Regexp::Grammars","archived":false,"fork":false,"pushed_at":"2015-12-15T10:59:27.000Z","size":143,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T18:57:05.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kentnl.png","metadata":{"files":{"readme":"README.mkdn","changelog":"Changes","contributing":"CONTRIBUTING.pod","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-12-25T00:41:46.000Z","updated_at":"2014-09-08T21:40:49.000Z","dependencies_parsed_at":"2022-08-16T12:45:30.799Z","dependency_job_id":null,"html_url":"https://github.com/kentnl/Regexp-Grammars-Common-String","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FRegexp-Grammars-Common-String","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FRegexp-Grammars-Common-String/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FRegexp-Grammars-Common-String/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FRegexp-Grammars-Common-String/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kentnl","download_url":"https://codeload.github.com/kentnl/Regexp-Grammars-Common-String/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240947648,"owners_count":19883030,"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":[],"created_at":"2024-11-11T14:05:36.399Z","updated_at":"2025-02-26T22:44:46.860Z","avatar_url":"https://github.com/kentnl.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nRegexp::Grammars::Common::String - Some basic String parsing Rules for Regexp::Grammars\n\n# VERSION\n\nversion 1.000003\n\n# SYNOPSIS\n\n    use Regex::Grammars;\n    use Regexp::Grammars::Common::String;\n\n    my $re = qr{\n\n        (.*\u003c[String]\u003e)+\n\n        \u003cextends: Regexp::Grammars::Common::String\u003e\n\n    }x; #  don't forget the x!\n\n        ...\n\n    if( $content =~ $re ){\n        print Dumper( \\%/ ); # Praying Mantis operator!?\n    }\n\n# DESCRIPTION\n\n[Regexp::Grammars](https://metacpan.org/pod/Regexp::Grammars) is just too useful to not use, but too pesky and confusing for new people.\n\nSome of the more complex things involve string extraction and escape-handling, and I seriously spent the better part 2 hours\nlearning how to make this work. So, even if this module is not immediately useful, it may serve as an educational tool for\nothers.\n\nI probably should have delved deeper into the [Regexp::Common](https://metacpan.org/pod/Regexp::Common) Family, but I couldn't find one in there that\ndid exactly what I wanted.\n\nAt present, this module only provides one rule, [\"String\"](#string), but I will probably add a few more later.\n\n# GRAMMARS\n\n## Regexp::Grammars::Common::String\n\n    \u003cextends: Regexp::Grammars::Common::String\u003e\n\n# RULES\n\n## String\n\nFor parsing strings like so:\n\n    \"Hello\"     =\u003e 'Hello'\n    \"Hel\\lo\"    =\u003e 'Hello'\n    \"Hel\\\\lo\"   =\u003e 'Hel\\lo'\n    \"Hel\\\"lo\"   =\u003e 'Hel\"lo'\n\nIt should do a reasonable job of picking up strings from files and properly returning their parsed contents.\n\nIt made sense to me to drop the excess `\\`'s that are used for escaping, in order to get a copy of the string as\nit would be seen to anything else that parsed it properly and evaluated the escapes into characters.\n\n# AUTHOR\n\nKent Fredric \u0026lt;kentnl@cpan.org\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2015 by Kent Fredric \u0026lt;kentnl@cpan.org\u003e.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentnl%2Fregexp-grammars-common-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkentnl%2Fregexp-grammars-common-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentnl%2Fregexp-grammars-common-string/lists"}