Page Inspect
Internal Links
0
External Links
4
Images
0
Headings
10
Page Content
Title:Pythex: a Python regular expression editor
Description:Pythex is a real-time regular expression editor for Python, a quick way to test your regular expressions.
HTML Size:56 KB
Markdown Size:2 KB
Fetched At:November 17, 2025
Page Structure
h1pythex
h1pythex
h2Match result:
h2Match captures:
h2Pattern debug:
h3Regular Expression Cheatsheet
h4Special Characters
h4Quantifiers
h4Special Sequences
h4Groups & Lookarounds
Markdown Content
Pythex: a Python regular expression editor
# pythex
A Python re module tester that runs entirely in your browser.
Loading Python Environment...
This might take a moment.
# pythex
A Python re module tester that runs entirely in your browser.
Copy link to this regex
Your regular expression:
Your test string:
Python source:
>>> >>>
Show Python source
Flags
IGNORECASE MULTILINE DOTALL VERBOSE ASCII DEBUG
Mode
finditer (all) search (first) fullmatch
## Match result:
## Match captures:
Results will appear here.
## Pattern debug:
### Regular Expression Cheatsheet
▼
#### Special Characters
`\`
escape special characters
`.`
matches any character (newlines only if DOTALL)
`^`
matches beginning of string
`$`
matches end of string
`[5b-d]`
matches '5', 'b', 'c' or 'd'
`[^a-c6]`
matches any char except 'a', 'b', 'c' or '6'
`R|S`
matches regex R or S
`()`
creates a capture group
#### Quantifiers
`*`
0 or more
`+`
1 or more
`?`
0 or 1
`{m}`
exactly m occurrences
`{m,n}`
from m to n
`{m,n}?`
from m to n, as few as possible
`*?`
non-greedy
#### Special Sequences
`\A`
start of string
`\b`
word boundary
`\B`
not word boundary
`\d`
digit
`\D`
non-digit
`\s`
whitespace
`\S`
non-whitespace
`\w`
alphanumeric
`\W`
non-alphanumeric
`\Z`
end of string
#### Groups & Lookarounds
`(?i)(?m)(?s)(?x)`
sets re.X flags
`(?:...)`
non-capturing group
`(?P<n>...)`
named group
`(?#...)`
a comment
`(?=...)`
lookahead assertion
`(?!...)`
negative lookahead
`(?<=...)`
lookbehind assertion
`(?<!...)`
negative lookbehind
`(?(id)y|n)`
conditional match
Inspired by Rubular. For a complete reference, see the official `re` module documentation.
Made by Gabriel Rodríguez. Running **Python** in the browser via Pyodide.