JS Regular Expression Awesome

screenshot of JS Regular Expression Awesome

:page_facing_up:我收藏的正则表达式大全,欢迎补充

Overview

The JS-Regular-expression-awesome document contains a collection of regular expressions for various use cases such as validating dates, passwords, phone numbers, email addresses, and more. It includes patterns for matching specific formats like dates, file extensions, phone numbers, and even Chinese characters. The document serves as a resource for developers to reference and use in their projects.

Features

  • Date Format Matching: Validates the latest match in the format "YYYY-MM-DD".
  • Password Validation: Ensures password complexity with options for different criteria such as length, character types, and restrictions on pure numbers or letters.
  • Phone Number Verification: Provides patterns for validating phone numbers, including WeChat and QQ numbers, domestic phone numbers, and formatted mobile numbers.
  • Email Address Validation: Offers regular expressions to validate email addresses based on common patterns.
  • Character String Validation: Includes patterns for verifying strings of specific lengths or compositions, such as all uppercase letters, all lowercase letters, alphanumeric characters, etc.

Summary

The JS-Regular-expression-awesome document is a valuable resource for developers needing predefined regular expressions for common validation tasks. By following the installation guide and incorporating the provided patterns into their codebase, developers can enhance the quality and security of their applications by ensuring that user inputs meet specified criteria. Regular expressions are powerful tools for validating and processing textual data, and this document provides a curated collection of patterns for various scenarios, from date formats to complex password requirements and more.