/pattern/
- Matches the literal string ‘pattern’.
Example:
/hello/
matches ‘hello’ in ‘hello world’.
A concise reference for regular expressions, covering common syntax, metacharacters, and usage examples to help you quickly craft and understand regex patterns.
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
Example: |
URL: Matches a URL. |
Email: Validates a basic email format. |
IP Address: Matches an IPv4 address. |
Date (YYYY-MM-DD): Matches a date in YYYY-MM-DD format. |
Phone Number (US): Matches a US phone number format (XXX-XXX-XXXX). |
HTML Tag: Matches an HTML tag. |