{"id":15625742,"url":"https://github.com/daniel15/namedregexp","last_synced_at":"2025-07-10T06:07:31.304Z","repository":{"id":4842267,"uuid":"5996482","full_name":"Daniel15/NamedRegExp","owner":"Daniel15","description":"Simple implementation of named capturing groups in JavaScript RegExps","archived":false,"fork":false,"pushed_at":"2012-10-01T12:22:19.000Z","size":124,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T17:14:57.026Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"rlisowski/open_flash_chart_2_plugin","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Daniel15.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-28T11:53:18.000Z","updated_at":"2013-12-08T11:53:07.000Z","dependencies_parsed_at":"2022-09-17T00:02:02.061Z","dependency_job_id":null,"html_url":"https://github.com/Daniel15/NamedRegExp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Daniel15/NamedRegExp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2FNamedRegExp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2FNamedRegExp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2FNamedRegExp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2FNamedRegExp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daniel15","download_url":"https://codeload.github.com/Daniel15/NamedRegExp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2FNamedRegExp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264537672,"owners_count":23624422,"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-10-03T10:02:44.628Z","updated_at":"2025-07-10T06:07:31.285Z","avatar_url":"https://github.com/Daniel15.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"NamedRegExp\r\n===========\r\n\r\nThis is a very simple and tiny JavaScript library to add support for [named capturing groups](http://www.regular-expressions.info/named.html)\r\nto JavaScript's RegExp object.  It does this by exposing a new class called `NamedRegExp` that \r\ninherits functionality from the native RegExp object and adds additional functionality.\r\n\r\nFor more advanced functionality, consider using [XRegExp](http://xregexp.com/).\r\n\r\nUsage\r\n=====\r\n\r\n```javascript\r\n// Matching\r\nvar regexp = new NamedRegExp('Hello (?P\u003cname\u003e\\\\w+) from (?P\u003cyear\u003e20[1-9][0-9])');\r\nvar results = regexp.exec('Hello Daniel from 2012');\r\nalert(results.name) // \"Daniel\"\r\nalert(results.year) // \"2012\"\r\n\r\n// Replacing\r\nvar result = 'Hello Daniel from 2012'.replace(regexp, '\\\\k\u003cyear\u003e is year of the \\\\k\u003cname\u003e!');\r\nalert(result); // \"2012 is year of the Daniel!\"\r\n```\r\n\r\nLicence\r\n=======\r\n(The MIT licence)\r\n\r\nCopyright (C) 2012 Daniel Lo Nigro (Daniel15)\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of\r\nthis software and associated documentation files (the \"Software\"), to deal in\r\nthe Software without restriction, including without limitation the rights to\r\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\r\nof the Software, and to permit persons to whom the Software is furnished to do\r\nso, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel15%2Fnamedregexp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel15%2Fnamedregexp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel15%2Fnamedregexp/lists"}