Regex Tool
Tester
Replace
Explain
Builder
Library
Cheatsheet
Code
View on GitHub
/
/
g
global — find all matches
i
case-insensitive
m
multiline — ^ $ match line breaks
s
dotall — . matches newlines
u
unicode mode
y
sticky — match from lastIndex
Copy
Copy pattern to clipboard
Clear
Clear the pattern
0
matches
0
groups
0
chars
Test String
Matches
Copy all
No matches yet — enter a pattern and some test text.
Test String
Replacement string
use $1, $2 for groups, $& for full match, $` $' for before/after
Result
Copy result
Split
splits the test string on every match
Pattern Explanation
Plain-English breakdown of every token
Enter a regex above and we'll explain every piece.
Regex Builder — click chips to append to the pattern
Character classes
Anchors & boundaries
Quantifiers
Groups & alternation
Lookaround
Special characters
Escape a literal string
Input a raw string — we'll escape regex metacharacters
Escaped result
Insert
Common Patterns Library
Click any card to use it
Regex Cheatsheet
Code Generator
Convert your regex to code in different languages
Copy