{"id":13413958,"url":"https://github.com/mingrammer/commonregex","last_synced_at":"2025-04-08T04:14:43.777Z","repository":{"id":38421773,"uuid":"85959870","full_name":"mingrammer/commonregex","owner":"mingrammer","description":"🍫 A collection of common regular expressions for Go","archived":false,"fork":false,"pushed_at":"2019-11-12T07:22:40.000Z","size":42,"stargazers_count":887,"open_issues_count":2,"forks_count":67,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-07-31T20:53:11.448Z","etag":null,"topics":["commonregex","pattern","regex","regexp","regular-expression","validation"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mingrammer.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":"2017-03-23T14:33:18.000Z","updated_at":"2024-07-31T12:47:01.000Z","dependencies_parsed_at":"2022-08-18T07:21:11.003Z","dependency_job_id":null,"html_url":"https://github.com/mingrammer/commonregex","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/mingrammer%2Fcommonregex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingrammer%2Fcommonregex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingrammer%2Fcommonregex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingrammer%2Fcommonregex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mingrammer","download_url":"https://codeload.github.com/mingrammer/commonregex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773719,"owners_count":20993639,"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":["commonregex","pattern","regex","regexp","regular-expression","validation"],"created_at":"2024-07-30T20:01:53.681Z","updated_at":"2025-04-08T04:14:43.737Z","avatar_url":"https://github.com/mingrammer.png","language":"Go","readme":"\u003cbr\u003e\u003cbr\u003e\n\n\u003ch1 align=\"center\"\u003eCommonRegex\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fmingrammer%2Fcommonregex?ref=badge_shield\" alt=\"FOSSA Status\"\u003e\u003cimg src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmingrammer%2Fcommonregex.svg?type=shield\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://godoc.org/github.com/mingrammer/commonregex\"\u003e\u003cimg src=\"https://godoc.org/github.com/mingrammer/commonregex?status.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/mingrammer/commonregex\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/mingrammer/commonregex\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/mingrammer/commonregex\"\u003e\u003cimg src=\"https://travis-ci.org/mingrammer/commonregex.svg?branch=master\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/mingrammer/commonregex\"\u003e\u003cimg src=\"https://codecov.io/gh/mingrammer/commonregex/branch/master/graph/badge.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A collection of often used regular expressions for Go\n\u003c/p\u003e\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n\u003e Inspired by [CommonRegex](https://github.com/madisonmay/CommonRegex)\n\nThis is a collection of often used regular expressions. It provides these as simple functions for getting the matched strings corresponding to specific patterns.\n\n## Installation\n```shell\ngo get github.com/mingrammer/commonregex\n```\n\n## Usage\n\n```go\nimport (\n    cregex \"github.com/mingrammer/commonregex\"\n)\n\nfunc main() {\n    text := `John, please get that article on www.linkedin.com to me by 5:00PM on Jan 9th 2012. 4:00 would be ideal, actually. If you have any questions, You can reach me at (519)-236-2723x341 or get in touch with my associate at harold.smith@gmail.com`\n\n    dateList := cregex.Date(text)\n    // ['Jan 9th 2012']\n    timeList := cregex.Time(text)\n    // ['5:00PM', '4:00']\n    linkList := cregex.Links(text)\n    // ['www.linkedin.com', 'harold.smith@gmail.com']\n    phoneList := cregex.PhonesWithExts(text)  \n    // ['(519)-236-2723x341']\n    emailList := cregex.Emails(text)\n    // ['harold.smith@gmail.com']\n}\n```\n\n## Features\n\n* Date\n* Time\n* Phone\n* Phones with exts\n* Link\n* Email\n* IPv4\n* IPv6\n* IP\n* Ports without well-known (not known ports)\n* Price\n* Hex color\n* Credit card\n* VISA credit card\n* MC credit card\n* ISBN 10/13\n* BTC address\n* Street address\n* Zip code\n* Po box\n* SSN\n* MD5\n* SHA1\n* SHA256\n* GUID\n* MAC address\n* IBAN\n* Git Repository\n\n## Thanks to :heart:\n\n* [@cschoede](https://github.com/cschoede)\n* [@schigh](https://github.com/schigh)\n* [@emaraschio](https://github.com/emaraschio)\n* [@mamal72](https://github.com/mamal72)\n* [@ahmdrz](https://github.com/ahmdrz)\n* [@fakenine](https://github.com/fakenine)\n* [@Bill-Park](https://github.com/Bill-Park)\n* [@jakewarren](https://github.com/jakewarren)\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmingrammer%2Fcommonregex.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmingrammer%2Fcommonregex?ref=badge_large)\n","funding_links":[],"categories":["Go","Text Processing","文本处理","Specific Formats","Template Engines","文本处理`解析和操作文本的代码库`","Bot Building","Libraries"],"sub_categories":["Parsers/Encoders/Decoders","HTTP Clients","Advanced Console UIs","查询语","解析 器/Encoders/Decoders","交流"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingrammer%2Fcommonregex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmingrammer%2Fcommonregex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingrammer%2Fcommonregex/lists"}