Pythex: a Python regular expression editor
文章推薦指數: 80 %
Pythex is a real-time regular expression editor for Python, a quick way to test your regular expressions.
🔗
Linktothisregex
pythex
/
Yourregularexpression:
IGNORECASE
MULTILINE
DOTALL
VERBOSE
Yourteststring:
Todayis2022-07-07.
pythexisaquickwaytotestyourPythonregularexpressions.Trywritingoneortesttheexample.
Matchresult:
Matchcaptures:
Regularexpressioncheatsheet
Specialcharacters
\
escapespecialcharacters
.
matchesanycharacter
^
matchesbeginningofstring
$
matchesendofstring
[5b-d]
matchesanychars'5','b','c'or'd'
[^a-c6]
matchesanycharexcept'a','b','c'or'6'
R|S
matcheseitherregexRorregexS
()
createsacapturegroupandindicatesprecedence
Quantifiers
*
0ormore(append?fornon-greedy)
+
1ormore(append?fornon-greedy)
?
0or1(append?fornon-greedy)
{m}
exactlymmoccurrences
{m,n}
frommton.mdefaultsto0,ntoinfinity
{m,n}?
frommton,asfewaspossible
Specialsequences
\A
startofstring
\b
matchesemptystringatwordboundary(between\wand\W)
\B
matchesemptystringnotatwordboundary
\d
digit
\D
non-digit
\s
whitespace:[\t\n\r\f\v]
\S
non-whitespace
\w
alphanumeric:[0-9a-zA-Z_]
\W
non-alphanumeric
\Z
endofstring
\g
延伸文章資訊
- 1Pythex: a Python regular expression editor
Pythex is a real-time regular expression editor for Python, a quick way to test your regular expr...
- 2Regex Generator - Web App to generate Regular Expressions
- 3RegExr: Learn, Build, & Test RegEx
Regular expression tester with syntax highlighting, PHP / PCRE & JS Support, contextual help, che...
- 4regex101: build, test, and debug regex
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python...
- 5Free Online Regular Expression Tester - FreeFormatter.com
This free regular expression tester lets you test your regular expressions against any entry of y...