{"id":31727718,"url":"https://github.com/archoleat/reglib","last_synced_at":"2026-03-13T23:13:15.557Z","repository":{"id":314818584,"uuid":"1051765243","full_name":"archoleat/reglib","owner":"archoleat","description":"Library with ready-to-use regex","archived":false,"fork":false,"pushed_at":"2026-01-06T16:27:34.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-21T00:21:20.530Z","etag":null,"topics":["archoleat","archoleat-reglib","library","plugin","ready-to-use","regex","reglib","regular-expression","regular-expressions"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@archoleat/reglib","language":"TypeScript","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/archoleat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-06T17:14:26.000Z","updated_at":"2026-01-06T16:27:37.000Z","dependencies_parsed_at":"2025-09-15T01:34:14.463Z","dependency_job_id":"efd931dd-609c-4a69-a24d-9361e8e2b0ab","html_url":"https://github.com/archoleat/reglib","commit_stats":null,"previous_names":["archoleat/reglib"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/archoleat/reglib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archoleat%2Freglib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archoleat%2Freglib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archoleat%2Freglib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archoleat%2Freglib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archoleat","download_url":"https://codeload.github.com/archoleat/reglib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archoleat%2Freglib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30479098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T20:45:58.186Z","status":"ssl_error","status_checked_at":"2026-03-13T20:45:20.133Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["archoleat","archoleat-reglib","library","plugin","ready-to-use","regex","reglib","regular-expression","regular-expressions"],"created_at":"2025-10-09T06:56:20.925Z","updated_at":"2026-03-13T23:13:15.548Z","avatar_url":"https://github.com/archoleat.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regex Library\n\n![NPM Version](https://img.shields.io/npm/v/%40archoleat%2Freglib)\n![NPM Downloads](https://img.shields.io/npm/dm/%40archoleat%2Freglib)\n![Specs](https://img.shields.io/github/actions/workflow/status/archoleat/reglib/spec.yaml?label=Specs)\n![Commitlint](https://img.shields.io/github/actions/workflow/status/archoleat/reglib/commitlint.yaml?label=Commitlint)\n![Editorconfig](https://img.shields.io/github/actions/workflow/status/archoleat/reglib/editorconfig.yaml?label=Editorconfig)\n![Prettier](https://img.shields.io/github/actions/workflow/status/archoleat/reglib/prettier.yaml?label=Prettier)\n![ESLint](https://img.shields.io/github/actions/workflow/status/archoleat/reglib/eslint.yaml?label=ESLint)\n![Remark](https://img.shields.io/github/actions/workflow/status/archoleat/reglib/remark.yaml?label=Remark)\n\n## Table of Contents\n\n- [Installation](#installtion)\n- [List of Regex](#list-of-regex)\n- [Contributing](#contributing)\n- [License](#license)\n\nThis library provides a collection of useful\nregular expressions for various use cases.\n\n## Installation\n\n```shell\nbun i -D @archoleat/reglib\n```\n\n## List of Regex\n\n- ATTRIBUTE_REGEX\n\n  - Pattern: `\\[[^\\]]+\\]`.\n  - Description: Matches an attribute in square brackets.\n  - Example: Matches `[attr]`, `[data-test]`, but not `[attr or attr]`.\n\n- CLASS_REGEX\n\n  - Pattern: `\\.[a-z0-9_-]+`.\n  - Description: Matches a CSS class name starting with a dot (.).\n  - Example: Matches `.class`, `.my-class`, `.class_name`, but not `class` or `.class!`.\n\n- BLOCK_REGEX\n\n  - Pattern: `[a-z][a-z0-9]*(-[a-z0-9]+)*`.\n  - Description: Matches a BEM block name.\n  - Example: Matches `block`, `my-block`, `block-name`, but not `Block` or `block!`.\n\n- ELEMENT_REGEX\n\n  - Pattern: `(__[a-z0-9]+(-[a-z0-9]+)*)`.\n  - Description: Matches a BEM element name.\n  - Example: Matches `__element`, `__my-element`, but not `element` or `__element!`.\n\n- MODIFIER_REGEX\n\n  - Pattern: `(--[a-z0-9]+(-[a-z0-9]+)*)`.\n  - Description: Matches a BEM modifier name.\n  - Example: Matches `--modifier`, `--my-modifier`, but not `modifier` or `--modifier!`.\n\n- SIBLING_REGEX\n\n  - Pattern: `(?:[^ ,{}]+\\s*)?\\+\\s*[^ ,{}]+`.\n  - Description: Matches a sibling selector in CSS.\n  - Example: Matches `+ p`, `div + p`, `.class + .another-class`, but not `div \u003e p`.\n\n- CHILD_REGEX\n\n  - Pattern: `(?:[^ ,{}]+\\s*)?\u003e\\s*[^ ,{}]+`.\n  - Description: Matches a child selector in CSS.\n  - Example: Matches `\u003e p`, `div \u003e p`, `.class \u003e .another-class`, but not `div + p`.\n\n- ATTRIBUTE_SIBLING_REGEX\n\n  - Pattern: `\\[[^\\]]+\\]\\s*\\+\\s*[^ ,{}]+`.\n  - Description: Matches an attribute selector followed by a sibling selector.\n  - Example: Matches `[attr] + div`, `[data-test] + .class`.\n\n- ATTRIBUTE_CHILD_REGEX\n\n  - Pattern: `\\[[^\\]]+\\]\\s*\u003e\\s*[^ ,{}]+`.\n  - Description: Matches an attribute selector followed by a child selector.\n  - Example: Matches `[attr] \u003e div`, `[data-test] \u003e .class`.\n\n- CLASS_SIBLING_REGEX\n\n  - Pattern: `\\.[a-z0-9_-]+\\s*\\+\\s*[^ ,{}]+`.\n  - Description: Matches a class selector followed by a sibling selector.\n  - Example: Matches `.class + div`, `.my-class + .another-class`.\n\n- CLASS_CHILD_REGEX\n\n  - Pattern: `\\.[a-z0-9_-]+\\s*\u003e\\s*[^ ,{}]+`.\n  - Description: Matches a class selector followed by a child selector.\n  - Example: Matches `.class \u003e div`, `.my-class \u003e .another-class`.\n\n- NESTED_ATTRIBUTE_SIBLING_REGEX\n\n  - Pattern: `\u0026\\[[^\\]]+\\]\\s*\\+\\s*[^ ,{}]+`.\n\n  - Description: Matches a nested attribute selector\n    followed by a sibling selector.\n\n  - Example: Matches `\u0026[attr] + div`, `\u0026[data-test] + .class`.\n\n- NESTED_ATTRIBUTE_CHILD_REGEX\n\n  - Pattern: `\u0026\\[[^\\]]+\\]\\s*\u003e\\s*[^ ,{}]+`.\n\n  - Description: Matches a nested attribute selector\n    followed by a child selector.\n\n  - Example: Matches `\u0026[attr] \u003e div`, `\u0026[data-test] \u003e .class`.\n\n- NESTED_CLASS_SIBLING_REGEX\n\n  - Pattern: `\u0026\\.[a-z0-9_-]+\\s*\\+\\s*[^ ,{}]+`.\n  - Description: Matches a nested class selector followed by a sibling selector.\n  - Example: Matches `\u0026.class + div`, `\u0026.my-class + .another-class`.\n\n- NESTED_CLASS_CHILD_REGEX\n\n  - Pattern: `\u0026\\.[a-z0-9_-]+\\s*\u003e\\s*[^ ,{}]+`.\n  - Description: Matches a nested class selector followed by a child selector.\n  - Example: Matches `\u0026.class \u003e div`, `\u0026.my-class \u003e .another-class`.\n\n- NESTED_ATTRIBUTE_REGEX\n\n  - Pattern: `\u0026\\[[^\\]]+\\]`.\n  - Description: Matches a nested attribute selector.\n  - Example: Matches `\u0026[attr]`, `\u0026[data-test]`.\n\n- NESTED_CLASS_REGEX\n\n  - Pattern: `\u0026\\.[a-z0-9_-]+`.\n  - Description: Matches a nested class selector.\n  - Example: Matches `\u0026.class`, `\u0026.my-class`.\n\n- EMAIL_REGEX\n\n  - Pattern: `^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$`.\n\n  - Description: Matches email addresses with basic validation.\n\n  - Example: Matches `user@example.com`, `test.email@domain.co.uk`,\n    but not `invalid@`, `@domain.com`, or `user@domain`.\n\n- FONT_FILE_NAME_REGEX\n\n  - Pattern: A complex regex for matching font file names.\n\n  - Description: Matches font file names based on family,\n    weight, italic, variable, and extension.\n\n  - Example: Matches `Roboto-Bold.woff2`, `OpenSans-Italic-Variable.ttf`.\n    \u003e More info [validate-font-file-name](https://github.com/archoleat/validate-font-file-name)\n\n- IS_MOBILE_REGEX\n\n  - Pattern: `Mobi|iP(hone|od|ad)|Android|BlackBerry`.\n\n  - Description: Detects mobile devices based on user agent strings.\n\n  - Example: Matches `iPhone`, `iPad`, `Android`, `BlackBerry`,\n    `Mobile Safari`, but not `Windows`, `Macintosh`.\n\n- NAME_REGEX\n\n  - Pattern: `^(?!-)[A-Za-z\\u00C0-\\u017FА-Яа-яЁё\\s\\-\\u3000\\u3040-\\u309F\\u30A0-\\u30FF\\u4E00-\\u9FAF\\u3400-\\u4DBF]+(?\u003c!-)$`.\n\n  - Description: Matches names with support for Latin, Cyrillic,\n    Japanese, and Chinese scripts. Cannot start or end with a hyphen.\n\n  - Example: Matches `John Doe`, `Jean-Paul`, `Иван Петров`,\n    `田中太郎`, but not `-John`, `Name-`, or `123`.\n\n## Contributing\n\nPlease read [**CONTRIBUTING**](https://github.com/archoleat/.github/blob/main/CONTRIBUTING.md)\nto start contributing.\n\n## License\n\nThis project is licensed under the [**MIT license**](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcholeat%2Freglib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcholeat%2Freglib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcholeat%2Freglib/lists"}