{"id":19560014,"url":"https://github.com/plotdb/curegex","last_synced_at":"2025-10-05T20:28:50.263Z","repository":{"id":79657956,"uuid":"321106675","full_name":"plotdb/curegex","owner":"plotdb","description":"commonly used regular expressions.","archived":false,"fork":false,"pushed_at":"2022-01-22T07:58:32.000Z","size":1614,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-15T11:04:09.690Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Pug","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plotdb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-13T16:17:47.000Z","updated_at":"2022-01-22T07:57:38.000Z","dependencies_parsed_at":"2023-05-25T12:45:08.051Z","dependency_job_id":null,"html_url":"https://github.com/plotdb/curegex","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"1394af6ed03015c40a6a1768af36112f249408cb"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Fcuregex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Fcuregex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Fcuregex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Fcuregex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plotdb","download_url":"https://codeload.github.com/plotdb/curegex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240816899,"owners_count":19862385,"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-11T05:05:33.470Z","updated_at":"2025-10-05T20:28:45.239Z","avatar_url":"https://github.com/plotdb.png","language":"Pug","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Commonly Used REGular EXpressions\n\n## Note\n\nSome regular expressions here are vulnerable to `ReDOS` attack. Be sure to use them with following conditions:\n\n - server side: Run these expression with libraries such as `google/re2`, `node-re2`.\n - client side: avoid them, or at least impose necessary limitations on input.\n\n\n## Installation\n\n    npm install --save curegex\n\n\n\n## Usage\n\ninclude `curegex.js` or `curegex.tw.js`, then use:\n\n    curegex.get(\"email\").exec(mystring);\n    curegex.get(\"email\", re2).exec(mystring); /* use `re2` regex engine instead of native RegExp */\n\nset default regular expression engine:\n\n    curegex.engine(re2);\n\n\n## Usage with NodeJS\n\ninclude `curegex` and use it by scope:\n\n    var curegex = require(\"curegex\");\n    var curegextw = require(\"curegex\").tw;\n \n\n## Resources\n\n - evil regex and rules of thumb: https://stackoverflow.com/questions/12841970/how-can-i-recognize-an-evil-regex\n   - per James Davis mentioned, avoid following:\n     - nesting quantifiers ( `(a+)+` )\n     - quantified overlapping disjunctions ( `(a|a)+` )\n     - quantified overlapping adjacencies ( `\\d+\\d+` )\n   - visualize regular expression to spot above cases: https://regexper.com/\n - https://en.wikipedia.org/wiki/ReDoS\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplotdb%2Fcuregex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplotdb%2Fcuregex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplotdb%2Fcuregex/lists"}