{"id":20044051,"url":"https://github.com/rockfordwei/perfect-pcre2","last_synced_at":"2025-08-20T21:11:39.005Z","repository":{"id":51355389,"uuid":"121573042","full_name":"RockfordWei/Perfect-PCRE2","owner":"RockfordWei","description":"An express Swift class wrapper for PCRE2","archived":false,"fork":false,"pushed_at":"2021-05-13T17:35:09.000Z","size":10,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-30T01:19:06.896Z","etag":null,"topics":["pcre2","perfect","regular-expression","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RockfordWei.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":"2018-02-14T23:23:57.000Z","updated_at":"2024-11-04T19:57:20.000Z","dependencies_parsed_at":"2022-09-24T21:51:10.320Z","dependency_job_id":null,"html_url":"https://github.com/RockfordWei/Perfect-PCRE2","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/RockfordWei/Perfect-PCRE2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RockfordWei%2FPerfect-PCRE2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RockfordWei%2FPerfect-PCRE2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RockfordWei%2FPerfect-PCRE2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RockfordWei%2FPerfect-PCRE2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RockfordWei","download_url":"https://codeload.github.com/RockfordWei/Perfect-PCRE2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RockfordWei%2FPerfect-PCRE2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271386119,"owners_count":24750510,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["pcre2","perfect","regular-expression","swift"],"created_at":"2024-11-13T10:59:43.690Z","updated_at":"2025-08-20T21:11:38.950Z","avatar_url":"https://github.com/RockfordWei.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Perfect-PCRE2\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"http://perfect.org/get-involved.html\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://perfect.org/assets/github/perfect_github_2_0_0.jpg\" alt=\"Get Involed with Perfect!\" width=\"854\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/PerfectlySoft/Perfect\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://www.perfect.org/github/Perfect_GH_button_1_Star.jpg\" alt=\"Star Perfect On Github\" /\u003e\n    \u003c/a\u003e  \n    \u003ca href=\"http://stackoverflow.com/questions/tagged/perfect\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://www.perfect.org/github/perfect_gh_button_2_SO.jpg\" alt=\"Stack Overflow\" /\u003e\n    \u003c/a\u003e  \n    \u003ca href=\"https://twitter.com/perfectlysoft\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://www.perfect.org/github/Perfect_GH_button_3_twit.jpg\" alt=\"Follow Perfect on Twitter\" /\u003e\n    \u003c/a\u003e  \n    \u003ca href=\"http://perfect.ly\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://www.perfect.org/github/Perfect_GH_button_4_slack.jpg\" alt=\"Join the Perfect Slack\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://developer.apple.com/swift/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Swift-4.2-orange.svg?style=flat\" alt=\"Swift 4.2\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://developer.apple.com/swift/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Platforms-OS%20X%20%7C%20Linux%20-lightgray.svg?style=flat\" alt=\"Platforms OS X | Linux\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://perfect.org/licensing.html\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/License-Apache-lightgrey.svg?style=flat\" alt=\"License Apache\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://twitter.com/PerfectlySoft\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Twitter-@PerfectlySoft-blue.svg?style=flat\" alt=\"PerfectlySoft Twitter\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://perfect.ly\" target=\"_blank\"\u003e\n        \u003cimg src=\"http://perfect.ly/badge.svg\" alt=\"Slack Status\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n\nThis project provides an easy solution to extract captured groups from a string by a PCRE2 compatible regular expression.\n\nThis package builds with Swift Package Manager and is part of the [Perfect](https://github.com/PerfectlySoft/Perfect) project but can also be used as an independent module.\n\n## Quick Start\n\n### Prerequisites\n\n#### Swift Version\n\nSwift 4.2+\n\n#### macOS\n\n``` \n$ brew install pcre2\n```\n\n#### Ubuntu Linux\n\n```\n$ sudo apt-get install libpcre2-dev\n```\n\n### Swift Package Manager\n\nAdd dependencies to your Package.swift\n\n``` swift\n.package(url: \"https://github.com/RockfordWei/Perfect-PCRE2.git\", \n\tfrom: \"3.1.0\")\n\n// on target section:\n.target(\n            // name: \"your project name\",\n            dependencies: [\"PerfectPCRE2\"]),\n```\n\n### Import Perfect PCRE2 Library\n\nAdd the following header to your swift source code:\n\n``` swift\nimport PerfectPCRE2\n```\n\n### Simple Usage\n\n``` swift\nlet lines = try \"\"\"\n\tHTTP/1.1 100 continue\n\tHTTP/1.0 200 OK\n\"\"\".pcre2Match(pattern: \"([A-Z]+)/([0-9.]+)\\\\s+([0-9]+)\\\\s+(.*)\")\n\nlines.forEach { line in\n\tprint(\"full: $0\", line[0]) // the full match\n\tprint(\"head: $1\", line[1]) // \"HTTP\"\n\tprint(\"vers: $2\", line[2]) // 1.1 or 1.0\n\tprint(\"code: $3\", line[3]) // 100 or 200\n\tprint(\"stat: $4\", line[4]) // continue or OK\n}\n```\n\n## Further Information\nFor more information on the Perfect project, please visit [perfect.org](http://perfect.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockfordwei%2Fperfect-pcre2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frockfordwei%2Fperfect-pcre2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockfordwei%2Fperfect-pcre2/lists"}