Intelligently generate and explain regular expressions, supporting various common pattern matching
Convert your text instructions into formulas or input a formula to have it explained.
Edit Excel online by chatting with AI
Convert your text instructions into SQL queries - powered by AI.
Generate Excel VBA (Visual Basic for Applications) code to automate tasks and create custom solutions within Microsoft Excel.
Upload your Excel file and generate beautiful charts with our AI-powered chart generator.
Convert your text into beautiful mind maps with our AI-powered mind map generator. Edit and customize your mind maps easily.
Use AI to intelligently generate and explain regular expressions, supporting various text pattern matching and data validation.
# Regular Expression Matching Email Addresses - Complete Tutorial
## Basic Email Matching
The simplest regex for email matching:
```regex
\S+@\S+\.\S+
Matching examples:
Standard email format regex:
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Features:
RFC 5322 standard regex:
^(?:[a-z0-9!#$%&'*+/=?^_\{|\}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_\{|\}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$
Regex supporting Unicode characters:
^[^\s@]+@[^\s@]+\.[^\s@]+$
Or a more precise version:
^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$
Taking the standard email regex as an example:
^ # Start of string
[a-zA-Z0-9._%+-]+ # Username part
@ # @ symbol
[a-zA-Z0-9.-]+ # Domain part
\. # Dot
[a-zA-Z]{2,} # Top-Level Domain
$ # End of string
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
import re
email_regex = re.compile(r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$')
$emailRegex = '/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/';
Pattern emailPattern = Pattern.compile("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$");
^[a-z0-9._%+-]+@([0-9]{1,3}\.){3}[0-9]{1,3}$
^[a-z0-9._%+-]+@[a-z0-9.-]+:\d+$
^(?!.*@(spamdomain|blocked)\.com$)[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$
(?:)
instead of
capturing groups ()
.
^(?=[a-z0-9@.!#$%&'*+/=?^_\{|\}~-]{6,254}$)[a-z0-9._%+-]{1,64}@(?:[a-z0-9-]{1,63}\.){1,8}[a-z]{2,63}$