Popular regex patterns

Email Address Validation: /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/ URL Validation: /^(https?|ftp):\/\/[^\s\/$.?#].[^\s]*$/i”; Username Validation (alphanumeric and underscores): /^[a-zA-Z0-9_]+$/ Password Validation (minimum 8 characters, at least one uppercase, one lowercase, one number, and one special character): /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/ Date (YYYY-MM-DD) Validation: /^\d{4}-\d{2}-\d{2}$/ HTML Tags Removal: /<[^>]+>/ Numeric-only String: /^[0-9]+$/ Alphabetic-only String: /^[a-zA-Z]+$/ Alphanumeric String: /^[a-zA-Z0-9]+$/ Hex Color Code: /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/ Credit Card Number […]

Read more.