Pythex: a Python regular expression editor

文章推薦指數: 80 %
投票人數:10人

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 matchesapreviouslydefinedgroup Specialsequences (?iLmsux) matchesemptystring,setsre.Xflags (?:...) non-capturingversionofregularparentheses (?P...) matcheswhatevermatchedpreviouslynamedgroup (?P=) digit (?#...) acomment;ignored (?=...) lookaheadassertion:matcheswithoutconsuming (?!...) negativelookaheadassertion (?<=...) lookbehindassertion:matchesifpreceded (?



請為這篇文章評分?