Mote
playground
Start
Start
Components
Buttons & badges
Cards & disclosure
Dialogs & drawers
Menus & commands
Dates & tables
Charts
Chart gallery
Fields
Choices
Display
Navigation
Popovers & sheets
Chat & AI
Messages
Prompt input
Reasoning & tools
Developer parts
Conversation
Code artifacts
Voice
Code blocks
Markdown
Elements
Editor
Terminal
Flow
3D boxes
Paint
Surface
Media
Icons
Primitives
Batteries
SQL
Storage
Net & resources
Crypto & bytes
Zip
Tables
PDF
Time
Images
Scan
Video & audio
Search
Syntax
Patterns
Notify
Share
Language
State & logic
Workers
Events & elements
Styling
Routes
Shortcuts
Long lists
Failures & try
Back end
Back end
Models & writes
Rules & failures
Jobs & schedules
Running it
Extensions
AI
Analytics
About
About
Batteries
Patterns
Search demos
⌘K
Accent
Scheme
light
dark
auto
Backdrop motion
Dark
Batteries
Patterns
Regular expressions, written as text. One pattern, its flags and a text at the top; every call of re below works on them as you type.
Pattern tester
A match is {text, at, end, groups, group}. A wrong pattern fails where it is used: the page keeps the message.
Source
Presets
Date
Email
Hex colour
Line starts
Wrong
Pattern
Flags
i
m
s
Text
Matches
3
Ordered
2026-11-15
, shipped
2026-11-18
, due
2026-12-01
.
The calls
Each on the pattern, flags and text above.
re.test and re.find
Is it there, and the first place it is.
Source
re.test
true if the pattern is anywhere in the text
true
re.find
2026-11-15
at 8, end 18
groups
$1
2026
$2
11
$3
15
group
1
the first group that took part
re.all
Every match, in order, with its groups.
Source
8–18
2026-11-15
2026
11
15
28–38
2026-11-18
2026
11
18
44–54
2026-12-01
2026
12
01
re.at and re.from
A match that starts exactly at i, and the first at or after i.
Source
i
where to look from
8
Ordered
2026-11-15, shipped 2026-11-18, due 2026-12-01.
re.at
2026-11-15
at 8, end 18
re.from
2026-11-15
at 8, end 18
re.replace
Every match is replaced; $1, $2 … are its groups.
Source
With
re.replace
Ordered 15/11/2026, shipped 18/11/2026, due 01/12/2026.
re.split
The text between the matches.
Source
Ordered
2026
11
15
, shipped
2026
11
18
, due
2026
12
01
.
13 pieces. A pattern with groups puts each group's text among them, as JavaScript does.
Writing patterns
re.escape and raw strings
Text to look for as it is, and backslashes that stay as written.
Source
Look for
In
re.escape
1\.5 \(approx\)
escaped
1.5 (approx)
at 9, end 21
as it is
125 approx
at 27, end 37
As a pattern, unescaped, the dot is any character and the brackets are a group: it finds something else.
r"\d+" is 3 characters
"\\d+" is 3
the same text
A tokeniser with re.at
One rule after another, each tried at the place the last token ended.
Source
total
name
=
operator
price
name
*
operator
1.0825
number
+
operator
'tax'
string
Mote
playground
Start
Start
Components
Buttons & badges
Cards & disclosure
Dialogs & drawers
Menus & commands
Dates & tables
Charts
Chart gallery
Fields
Choices
Display
Navigation
Popovers & sheets
Chat & AI
Messages
Prompt input
Reasoning & tools
Developer parts
Conversation
Code artifacts
Voice
Code blocks
Markdown
Elements
Editor
Terminal
Flow
3D boxes
Paint
Surface
Media
Icons
Primitives
Batteries
SQL
Storage
Net & resources
Crypto & bytes
Zip
Tables
PDF
Time
Images
Scan
Video & audio
Search
Syntax
Patterns
Notify
Share
Language
State & logic
Workers
Events & elements
Styling
Routes
Shortcuts
Long lists
Failures & try
Back end
Back end
Models & writes
Rules & failures
Jobs & schedules
Running it
Extensions
AI
Analytics
About
About
esc
Pages
Start
Start
Buttons & badges
Components
Cards & disclosure
Components
Dialogs & drawers
Components
Menus & commands
Components
Dates & tables
Components
Charts
Components
Chart gallery
Components
Fields
Components
Choices
Components
Display
Components
Navigation
Components
Popovers & sheets
Components
Messages
Chat & AI
Prompt input
Chat & AI
Reasoning & tools
Chat & AI
Developer parts
Chat & AI
Conversation
Chat & AI
Code artifacts
Chat & AI
Voice
Chat & AI
Code blocks
Chat & AI
Markdown
Chat & AI
Editor
Elements
Terminal
Elements
Flow
Elements
3D boxes
Elements
Paint
Elements
Surface
Elements
Media
Elements
Icons
Elements
Primitives
Elements
SQL
Batteries
Storage
Batteries
Net & resources
Batteries
Crypto & bytes
Batteries
Zip
Batteries
Tables
Batteries
PDF
Batteries
Time
Batteries
Images
Batteries
Scan
Batteries
Video & audio
Batteries
Search
Batteries
Syntax
Batteries
Patterns
Batteries
Notify
Batteries
Share
Batteries
State & logic
Language
Workers
Language
Events & elements
Language
Styling
Language
Routes
Language
Shortcuts
Language
Long lists
Language
Failures & try
Language
Back end
Back end
Models & writes
Back end
Rules & failures
Back end
Jobs & schedules
Back end
Running it
Back end
Extensions
Back end
AI
Back end
Analytics
Back end
About
About
↑↓
move
↵
open
676 places · ranked by BM25