Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Social
Join the Discord community!
Follow me on twitter!
Send me an email
Donate
Donate
Donate through Paypal
Become a Github Sponsor
Info
Info
Find out what's new!
RegEx101 Wiki
Report bugs or make suggestions
What's new?
Loading content...
Close
Regex Editor
Regex Editor
Community Patterns
Community Patterns
Account
Account
Regex Quiz
Regex Quiz
Settings
Settings
Live Help
Live Help
Get help on Discord
Get help on IRC
Save & Share
Fork Regex
ctrl+s
Go to community entry
Save Regular Expression
Link to regular expression
Copy to clipboard
Your regex has been saved and may be accessed with this link by anybody you give it to.
Close
Add Regex to the community pattern library
Title
*
0/150
Description
*
Write
Preview
Add header
Add bold text
Add italic text
Insert quote
Insert code snippet
Insert link
Add bulleted list
Add numbered list
Headers
H1
H2
H3
0/5000
Styling with Markdown is supported
Author
0/150
Please remember this entry will be public in the community library. This is not your personal regex library! To save, access and manage your personal entries, please go to the
account page
instead.
Update
Cancel
Flavor
Need help selecting flavor?
Need help selecting flavor?
PCRE2 (PHP >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
.NET (C#)
Rust
Flavor Help
Loading content...
Close
Function
Match
Substitution
List
Unit Tests
Tools
Code Generator
Regex Debugger
Export Matches
There is currently no data to export
Export Matches
Export Method
JSON
CSV
Plain Text
Data
Copy to clipboard
Include full match in exported data
Close
Sponsors
Explanation
An explanation of your regex will be automatically generated as you type.
Match Information
Detailed match information will be displayed here automatically.
Quick Reference
Regular Expression
No Match
v1
Select Regex Version
Regex Versions
~
Change delimiter
Delimiters
/
~
@
;
%
`
#
~
ugm
Regex Flags
g
lobal
Don't return after first match
m
ulti line
^ and $ match start/end of line
i
nsensitive
Case insensitive match
e
x
tended
Ignore whitespace
e
X
tra
Disallow meaningless escapes
s
ingle line
Dot matches newline
u
nicode
Match with full unicode
U
ngreedy
Make quantifiers lazy
A
nchored
Anchor to start of pattern, or at the end of the most recent match
J
changed
Allow duplicate subpattern names
D
ollar end only
$ matches only end of pattern
Set Regex Options
Copy to clipboard
Test String
Keyboard Shortcuts
Shortcut
Description
ctrl+1
Switch to regex matching
ctrl+2
Switch to regex substitution
ctrl+3
Switch to regex list substitution
ctrl+4
Switch to unit tests
ctrl+b
Open regex debugger
ctrl+g
Open code generator
ctrl+enter
Run unit tests (when view is open)
Close