My Regular Expression - REGEX
Email Address Validation:
/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/
/^(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}$/
/<[^>]+>/
/^[0-9]+$/
/^[a-zA-Z]+$/
/^[a-zA-Z0-9]+$/
/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/
Credit Card Number (Simple):
/^\d{4}-\d{4}-\d{4}-\d{4}$/
/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/
/^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/
/^(\\+98|0)?9\\d{9}$/
/^09(1[0-9]|3[1-9])-?[0-9]{3}-?[0-9]{4}$/
/\s+/
/^[1-9]\d*$/
/^-[1-9]\d*$/
HTML Attribute Extraction:
/([a-zA-Z-]+)="([^"]*)"/
/^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
/^\d{5}(-\d{4})?$/
/^[0-9]{11}$/
/^\d+(\.\d+)?$/
Alphanumeric with Underscores:
/^[a-zA-Z0-9_]+$/
/^[0-9]{10}$/
UUID (Universally Unique Identifier):
/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$/
/^[a-zA-Z0-9_-]{11}$/
Markdown Image Tag Extraction:
/!\[([^\]]*)\]\(([^)]+)\)/
JWT (JSON Web Token) Extraction:
/^([a-zA-Z0-9-_=]+)\.([a-zA-Z0-9-_=]+)\.([a-zA-Z0-9-_.+/=]+)$/
MIME Type Extraction from File Extension:
/\.([a-zA-Z0-9]+)$/
/^#{1,6}\s(.+)$/
/^([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}$/
CSS Class Extraction:
/\.[a-zA-Z0-9_-]+/
Positive or Negative Decimal with optional exponent:
/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/