{"id":18259124,"url":"https://github.com/github30/cc-regex","last_synced_at":"2025-08-23T12:37:33.965Z","repository":{"id":56765325,"uuid":"524815649","full_name":"GitHub30/cc-regex","owner":"GitHub30","description":"'foo@example.com'.match(/\\x{email}/)","archived":false,"fork":false,"pushed_at":"2022-08-15T12:47:22.000Z","size":41,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-22T09:05:35.582Z","etag":null,"topics":["charactors","class","email","prefecture","regex","regexp","regular-expression","url"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cc-regex","language":"JavaScript","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/GitHub30.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":"2022-08-15T00:56:07.000Z","updated_at":"2022-08-21T00:11:30.000Z","dependencies_parsed_at":"2022-08-16T02:10:44.970Z","dependency_job_id":null,"html_url":"https://github.com/GitHub30/cc-regex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GitHub30/cc-regex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHub30%2Fcc-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHub30%2Fcc-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHub30%2Fcc-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHub30%2Fcc-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitHub30","download_url":"https://codeload.github.com/GitHub30/cc-regex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitHub30%2Fcc-regex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271747026,"owners_count":24813605,"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-23T02:00:09.327Z","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":["charactors","class","email","prefecture","regex","regexp","regular-expression","url"],"created_at":"2024-11-05T10:36:32.312Z","updated_at":"2025-08-23T12:37:33.945Z","avatar_url":"https://github.com/GitHub30.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/cc-regex.svg)](https://badge.fury.io/js/cc-regex)\n\n# cc-regex\nRegular expression for Character classes\n\n## Usage\n\n### Find an email address\n\n```javascript\n'foo@example.com'.match(/\\x{email}/g)\n// ['foo@example.com']\n```\n\n### Find a URL\n\n```javascript\n'https://example.com/foo/bar'.match(/\\x{url}/g)\n// ['https://example.com/foo/bar']\n```\n\n### Find a 都道府県\n\n```javascript\n'島根県にパソコンなんてあるわけないじゃん'.match(/\\x{都道府県}/g)\n// ['島根県']\n```\n\n### Find a IP address\n\n```javascript\n'127.0.0.1'.match(/\\x{ip}/g)\n// ['127.0.0.1']\n```\n\n### Find a FQDN\n\n```javascript\n'example.com sub.example.com'.match(/\\x{fqdn}/g)\n// ['example.com', 'sub.example.com']\n```\n\n### Find a Location\n\n```javascript\nconst str = '時どき私はそんな路を歩きながら、ふと、そこが京都ではなくて京都から何百里も離れた仙台とか長崎とか――そのような市へ今自分が来ているのだ――という錯覚を起こそうと努める。'\nawait str.matchAsync(/\\x{場所}/g)\n// ['京都', '京都', '仙台', '長崎']\n```\n\n### Find a Person\n\n```javascript\nconst str = '昨日、ジョンと山田太郎は松のやでカツ丼を食した。'\nawait str.matchAsync(/\\x{人物}/g)\n// ['ジョン', '山田太郎']\n```\n\n## Install\n\n```bash\nnpm install cc-regex\n```\n\n![image](https://user-images.githubusercontent.com/12811398/184637627-af99820e-40e6-4bd3-99ea-aba73a27fcab.png)\n\n### for browser\n\n```html\n\u003cscript src=\"https://github30.github.io/cc-regex/index.js\"\u003e\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub30%2Fcc-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub30%2Fcc-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub30%2Fcc-regex/lists"}