# any86/any-rule

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/any86-any-rule).**

8,662 stars · 811 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/any86/any-rule
- Homepage: https://any-rule.vercel.app/
- awesome-repositories: https://awesome-repositories.com/repository/any86-any-rule.md

## Topics

`awsome` `express` `regex` `regexp` `zheng-ze`

## Description

Any-rule is a multi-platform regular expression tool that provides a curated catalog of over 70 ready-to-use patterns for validating and extracting common data formats. The project separates its static regex collection from editor-specific plugins, allowing the same pattern library to be accessed through VS Code, IntelliJ IDEA, Alfred Workflow, and a web interface.

The tool enables keyword-based pattern retrieval, letting users search for the correct regex by typing descriptive terms rather than remembering exact syntax. It covers a broad range of validation needs including email addresses, URLs, dates, IP addresses, phone numbers, and identification numbers, with particular depth in Chinese-specific formats such as ID card numbers, license plates, social credit codes, and stock codes. Beyond validation, the library also supports data extraction tasks like matching Chinese characters, HTML tags, and HTML comments from text.

Each pattern is defined as a static string literal, and the tool includes a visual diagram feature that helps users understand how a selected regex works. The documentation and installation surface covers the web interface, VS Code extension, IntelliJ plugin, and Alfred workflow, all drawing from the same underlying pattern catalog.

## Tags

### Part of an Awesome List

- [Multi-Platform Pattern Libraries](https://awesome-repositories.com/f/awesome-lists/devtools/regex-and-pattern-matching/regex-pattern-matching/multi-platform-pattern-libraries.md) — Offers the same regex pattern library through web, VS Code, IntelliJ, and Alfred Workflow integrations.
- [Regex Pattern Catalogs](https://awesome-repositories.com/f/awesome-lists/devtools/regex-and-pattern-matching/regex-pattern-matching/regex-pattern-catalogs.md) — Stores over 70 curated regular expressions as a searchable key-value dictionary for validation and extraction.
- [Working Hour Calculators](https://awesome-repositories.com/f/awesome-lists/productivity/time-tracking-and-focus/working-hour-calculators.md) — Provides a regex pattern that validates strings against the HH:mm:ss 24-hour clock format. ([source](https://any86.github.io/any-rule/))
- [Developer Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/developer-utilities.md) — Comprehensive library of regular expressions.

### Data & Databases

- [Chinese Identification Validators](https://awesome-repositories.com/f/data-databases/data-validation/number-type-validation/identification-number-validation/chinese-identification-validators.md) — Ships validators for Chinese ID numbers, license plates, social credit codes, and other national formats.
- [Chinese ID Card Number Validators](https://awesome-repositories.com/f/data-databases/data-validation/number-type-validation/identification-number-validation/chinese-id-card-number-validators.md) — Provides a regex pattern that verifies a string matches the 15- or 18-digit Chinese citizen identification number format. ([source](https://any86.github.io/any-rule/))
- [License Plate Number Validators](https://awesome-repositories.com/f/data-databases/data-validation/number-type-validation/identification-number-validation/chinese-identification-validators/license-plate-number-validators.md) — Checks whether a string matches the format of a Chinese vehicle license plate, including new energy types. ([source](https://any86.github.io/any-rule/))
- [IMEI Validators](https://awesome-repositories.com/f/data-databases/data-validation/number-type-validation/identification-number-validation/imei-validators.md) — Ships a regex pattern to validate IMEI number format. ([source](https://any86.github.io/any-rule/))
- [Decimal Number Validators](https://awesome-repositories.com/f/data-databases/decimal-type-conversion/decimal-number-fields/decimal-number-validators.md) — Ships a regex pattern to validate decimal number strings. ([source](https://any86.github.io/any-rule/))
- [Chinese Province Validators](https://awesome-repositories.com/f/data-databases/state-and-province-data/chinese-province-validators.md) — Provides a regex pattern to validate Chinese province, municipality, and special administrative region names. ([source](https://any86.github.io/any-rule/))
- [Chinese Stock Code Validators](https://awesome-repositories.com/f/data-databases/stock-code-registries/chinese-stock-code-validators.md) — Ships a regex pattern to validate Chinese A-share stock code formats for Shanghai and Shenzhen exchanges. ([source](https://any86.github.io/any-rule/))
- [Chinese Text Matchers](https://awesome-repositories.com/f/data-databases/text-processing-utilities/text-extraction/text-segmentation/chinese-language-segmenters/chinese-text-moderation/chinese-text-matchers.md) — Provides a regex pattern that matches Chinese characters together with Chinese punctuation marks. ([source](https://any86.github.io/any-rule/))
- [Chinese Character Matchers](https://awesome-repositories.com/f/data-databases/text-processing-utilities/text-extraction/text-segmentation/chinese-language-segmenters/traditional-chinese-support/chinese-character-simplifiers/chinese-character-matchers.md) — Provides a regex pattern that matches every individual Chinese character inside a text string. ([source](https://any86.github.io/any-rule/))
- [Chinese Name Validators](https://awesome-repositories.com/f/data-databases/text-processing-utilities/text-extraction/text-segmentation/chinese-language-segmenters/traditional-chinese-support/chinese-character-simplifiers/chinese-name-validators.md) — Provides a regex pattern that checks whether a string consists of 2 to 16 Chinese characters forming a valid Chinese name. ([source](https://any86.github.io/any-rule/))
- [English Name Validators](https://awesome-repositories.com/f/data-databases/text-processing-utilities/text-extraction/text-segmentation/chinese-language-segmenters/traditional-chinese-support/chinese-character-simplifiers/english-name-validators.md) — Verifies that a string consists of letters and spaces that form a valid English name. ([source](https://any86.github.io/any-rule/))

### Development Tools & Productivity

- [Regex Pattern Searches](https://awesome-repositories.com/f/development-tools-productivity/editor-search-integrations/regex-pattern-searches.md) — Enables searching for regex patterns by keyword directly within VS Code and IntelliJ IDEA. ([source](https://cdn.jsdelivr.net/gh/any86/any-rule@master/README.md))
- [Pattern Search Tools](https://awesome-repositories.com/f/development-tools-productivity/file-search-utilities/regex-pattern-matching/pattern-search-tools.md) — Enables keyword-based search for regex patterns directly inside VS Code and IntelliJ IDEA.
- [Regex Tooling](https://awesome-repositories.com/f/development-tools-productivity/regex-tooling.md) — Provides a curated catalog of over 70 ready-to-use regular expression patterns for common data formats.
- [Keyword Matching](https://awesome-repositories.com/f/development-tools-productivity/search-query-utilities/keyword-matching.md) — Ships keyword-based pattern retrieval that matches user-supplied terms against pattern names and descriptions.
- [Regex Pattern Inserters](https://awesome-repositories.com/f/development-tools-productivity/vs-code-extensions/regex-pattern-inserters.md) — Provides VS Code and IntelliJ extensions for searching and inserting regex patterns without leaving the editor.
- [HTML Tag Matchers](https://awesome-repositories.com/f/development-tools-productivity/balanced-tag-matching/html-tag-matchers.md) — Provides a regex pattern that finds every HTML tag embedded inside a text string. ([source](https://any86.github.io/any-rule/))
- [HTML Comment Matchers](https://awesome-repositories.com/f/development-tools-productivity/comment-block-navigation/html-comment-matchers.md) — Provides a regex pattern that finds every HTML comment block embedded inside a text string. ([source](https://any86.github.io/any-rule/))
- [Visualizers](https://awesome-repositories.com/f/development-tools-productivity/regular-expressions/visualizers.md) — Includes a visual diagram feature that renders regex patterns to illustrate their matching logic.

### Networking & Communication

- [Email Address Validators](https://awesome-repositories.com/f/networking-communication/email-address-validators.md) — Provides a regex pattern to validate email address format. ([source](https://any86.github.io/any-rule/))
- [IP Address Validation](https://awesome-repositories.com/f/networking-communication/ip-address-validation.md) — Provides a regex pattern to validate IPv4 and IPv6 address format with optional port. ([source](https://any86.github.io/any-rule/))
- [Image URL Validators](https://awesome-repositories.com/f/networking-communication/network-addressing/url-normalizers/url-validations/image-url-validators.md) — Includes a regex pattern to validate image file URLs. ([source](https://any86.github.io/any-rule/))
- [Chinese Landline Number Validators](https://awesome-repositories.com/f/networking-communication/phone-number-validation/chinese-landline-number-validators.md) — Provides a regex pattern that checks whether a string matches the format of a Chinese landline phone number including its area code. ([source](https://any86.github.io/any-rule/))
- [Chinese Phone Number Validators](https://awesome-repositories.com/f/networking-communication/phone-number-validation/chinese-phone-number-validators.md) — Provides a regex pattern that verifies a string matches the format of a Chinese mobile phone number at a chosen strictness level. ([source](https://any86.github.io/any-rule/))

### Security & Cryptography

- [Format Validators](https://awesome-repositories.com/f/security-cryptography/pattern-matching-engines/format-validators.md) — Provides over 70 ready-to-use regular expressions for validating common data formats like emails and phone numbers. ([source](https://cdn.jsdelivr.net/gh/any86/any-rule@master/README.md))
- [Bank Card Number Validators](https://awesome-repositories.com/f/security-cryptography/bank-identification-number-validators/bank-card-number-validators.md) — Provides a regex pattern that verifies a string contains only digits and is between 10 and 30 characters long. ([source](https://any86.github.io/any-rule/))
- [MD5 Hash Validators](https://awesome-repositories.com/f/security-cryptography/data-hashing-utilities/md5-hash-validators.md) — Provides a regex pattern to validate MD5 hash format. ([source](https://any86.github.io/any-rule/))

### Software Engineering & Architecture

- [Multi-Platform](https://awesome-repositories.com/f/software-engineering-architecture/plugin-architectures/multi-platform.md) — Exposes the same regex catalog through VS Code, IntelliJ, and Alfred plugins with platform-specific UIs.
- [Common Format Validators](https://awesome-repositories.com/f/software-engineering-architecture/regex-pattern-validators/common-format-validators.md) — Ships over 70 ready-to-use regex validators for common data formats like emails, URLs, and phone numbers.
- [Base64 Input Validators](https://awesome-repositories.com/f/software-engineering-architecture/base64-encoding-and-decoding/base64-input-validators.md) — Provides a regex pattern that verifies a string is a valid base64-encoded data URI. ([source](https://any86.github.io/any-rule/))
- [Regex Visualizers](https://awesome-repositories.com/f/software-engineering-architecture/regex-visualizers.md) — Open a visual diagram of any regex pattern to understand its structure and behavior. ([source](https://cdn.jsdelivr.net/gh/any86/any-rule@master/README.md))
- [Date Validation](https://awesome-repositories.com/f/software-engineering-architecture/runtime-value-validation/date-validation.md) — Provides a regex pattern to validate date strings with optional leap year checking. ([source](https://any86.github.io/any-rule/))
- [Time Format Validators](https://awesome-repositories.com/f/software-engineering-architecture/time-format-validators.md) — Provides a regex pattern that validates strings against the hh:mm:ss 12-hour clock format. ([source](https://any86.github.io/any-rule/))

### User Interface & Experience

- [Editor-Agnostic Data Layers](https://awesome-repositories.com/f/user-interface-experience/ui-components/text-editors/node-editors/editor-data-architectures/editor-agnostic-data-layers.md) — Provides an architecture that separates the regex catalog from editor-specific plugins for cross-platform reuse.
- [Color Format Validators](https://awesome-repositories.com/f/user-interface-experience/color-format-validators.md) — Provides a regex pattern to validate hex color code format. ([source](https://any86.github.io/any-rule/))
- [Static Pattern Definitions](https://awesome-repositories.com/f/user-interface-experience/form-components/range-inputs/pattern-literals/static-pattern-definitions.md) — Defines every regex as a hardcoded string literal rather than generating patterns at runtime.

### Web Development

- [String Format Validators](https://awesome-repositories.com/f/web-development/string-format-validators.md) — Provides over 70 ready-to-use regex patterns for validating common data formats like emails, URLs, and dates.
- [Alphabetic String Validators](https://awesome-repositories.com/f/web-development/string-format-validators/alphabetic-string-validators.md) — Provides a regex pattern that checks whether a string contains only English letters. ([source](https://any86.github.io/any-rule/))
- [Alphanumeric String Validators](https://awesome-repositories.com/f/web-development/string-format-validators/alphanumeric-string-validators.md) — Provides a regex pattern that verifies a string contains only letters and numbers. ([source](https://any86.github.io/any-rule/))
- [Currency Amount Validators](https://awesome-repositories.com/f/web-development/string-format-validators/alphanumeric-string-validators/currency-amount-validators.md) — Checks whether a string is a valid monetary amount that may include a negative sign and thousands separators. ([source](https://any86.github.io/any-rule/))

### Operating Systems & Systems Programming

- [Linux File Path Validators](https://awesome-repositories.com/f/operating-systems-systems-programming/system-administration-maintenance/file-system-management/file-system-utilities/path-validation-utilities/linux-file-path-validators.md) — Ships a regex pattern to validate Linux file path format. ([source](https://any86.github.io/any-rule/))
- [Linux Folder Path Validators](https://awesome-repositories.com/f/operating-systems-systems-programming/system-administration-maintenance/file-system-management/file-system-utilities/path-validation-utilities/linux-folder-path-validators.md) — Includes a regex pattern to validate Linux folder path format. ([source](https://any86.github.io/any-rule/))

### System Administration & Monitoring

- [UUID Validation](https://awesome-repositories.com/f/system-administration-monitoring/user-group-management/uuid-validation.md) — Provides a regex pattern to validate GUID or UUID format. ([source](https://any86.github.io/any-rule/))
