Enter a regular expression and a test string to see matches highlighted in real time.
🔒100% Client-Side. Everything runs in your browser — no data is sent to any server.
Test string
Matches
Enter a pattern above to see matches
Python regex with the re module
import re
text = "Contact us at hello@example.com or support@site.org"
pattern = r'\b\w+@\w+\.\w+\b'
# Find all matches
matches = re.findall(pattern, text)
print(matches) # ['hello@example.com', 'support@site.org']
# Find with position info
for m in re.finditer(pattern, text):
print(f"Match: {m.group()!r} span: {m.span()}")
# Named groups
pattern2 = r'(?P<user>\w+)@(?P<domain>\w+\.\w+)'
m = re.search(pattern2, text)
if m:
print(m.group('user'), m.group('domain'))