Online Regex tester and visualizer - ExtendsClass
文章推薦指數: 80 %
CyrilEx is an online regex debugger, it allows you to test regular expression in PHP (PCRE), Python, Ruby, JavaScript, Java and MySQL. It helps you to test ...
ItwouldbenicetodisableadBlock,advertisingistheonlyresourceofthiswebsite:)
Regularexpressiontotest//gFlagsglobalsearch(g)Findsallthecorrespondencesratherthanstoppingafterthefirstmatchcaseinsensitive(i)Caseisignoredmultiline(m)Startandendcharacters(^and$)aretreatedasworkingoneachlineunicode(u)TreattheregularexpressionasasequenceofUnicodecodepointssticky(y)MatchesonlyfromtheindexindicatedbythelastIndexpropertyofthisregularexpressiondotallmake.matchnewlinetoo.(s)Dotmetacharactermatchesallcharacters,includingnewlinesglobalsearch(g)Findsallthecorrespondencesratherthanstoppingafterthefirstmatchcaseinsensitive(i)Caseisignoredmultiline(m)Startandendcharacters(^and$)aretreatedasworkingoneachlineunicode(u)TreattheregularexpressionasasequenceofUnicodecodepointsdotallmake.matchnewlinetoo.(s)Dotmetacharactermatchesallcharacters,includingnewlinescomment(x)Ignorewhitespaceinregexanchored(A)Forcedtobe"anchored",thatis,itisconstrainedtomatchonlyatthestartofthestringwhichisbeingsearcheddollarendonly(D)Dollarmetacharactermatchesonlyattheendofthesubjectstringextraanalysis(S)Extraanalysisisperformedungreedy(U)Invertsthe"greediness"ofthequantifierssothattheyarenotgreedybydefault,butbecomegreedyiffollowedby?(NotcompatiblewithPerl)extra(X)TurnsonadditionalfunctionalityofPCREthatisincompatiblewithPerljchanged(J)Allowduplicatenamesforsubpatternsglobalsearch(g)FindsallthecorrespondencesratherthanstoppingafterthefirstmatchIGNORECASE(i)CaseisignoredMULTILINE(m)Startandendcharacters(^and$)aretreatedasworkingoneachlineLOCALE(l)Make\w,\W,\b,\Bandcase-insensitivematchingdependentonthecurrentlocale.UNICODE(u)TreattheregularexpressionasasequenceofUnicodecodepointsDOTALLmake.matchnewlinetoo.(s)Dotmetacharactermatchesallcharacters,includingnewlinesVERBOSE(x)Ignorewhitespaceinregexglobalsearch(g)FindsallthecorrespondencesratherthanstoppingafterthefirstmatchIGNORECASE(i)CaseisignoredMULTILINE(m)Startandendcharacters(^and$)aretreatedasworkingoneachlineEXTENDED(x)Ignorewhitespaceinregexglobalsearch(g)FindsallthecorrespondencesratherthanstoppingafterthefirstmatchCASE_INSENSITIVE(i)Enablescase-insensitivematching.COMMENTS(x)Permitswhitespaceandcommentsinpattern.DOTALL(s)Enablesdotallmode.MULTILINE(m)Enablesmultilinemode.UNICODE_CASE(u)EnablesUnicode-awarecasefolding.UNIX_LINES(l)EnablesUnixlinesmode.CANON_EQ(c)Enablescanonicalequivalence.LITERAL(L)Enablesliteralparsingofthepattern.UNICODE_CHARACTER_CLASS(C)EnablestheUnicodeversionofPredefinedcharacterclassesandPOSIXcharacterclasses..globalsearch(g)FindsallthecorrespondencesratherthanstoppingafterthefirstmatchCase-sensitivematching(c).Caseisignored(i)Multiple-linemode(m)Recognizelineterminatorswithinthestring.Thedefaultbehavioristomatchlineterminatorsonlyatthestartandendofthestringexpression.The.charactermatcheslineterminators(n)The.charactermatcheslineterminatorsUnix-onlylineendings(u)Onlythenewlinecharacterisrecognizedasalineendingbythe.,^,and$matchoperators.StringtotestGenerateastringfromRegEx(Beta)ExplanationSubstitutionRegExEngineSave&ShareQuickStartJavaScriptPython(3.4)Ruby(2.1)Java(JDK14)PHP(7)MySQL8.0(beta)Savethisregularexpressioninordertoshareit.SaveUpdateDeleteForkBecareful,thedatawillbeaccessibletoeveryone,pleasedonotsavesensitivedata.Anchors$Endofstringorendofline(inmulti-linepattern)^Startofstringorstartofline(inmulti-linepattern)\bWordboundary\BNotwordboundaryQuantifiersx?0or1x+1ormore*0ormore{2}Exactly2{2,}2ormore{2,5}Between2and5Metacharacters.Anysinglecharacterexceptlinebreak(\n,\r)\wWordcharacter\WNon-wordcharacter\dDigit\DNon-digitcharacter\sWhitespacecharacter([\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff])\SNon-whitespacecharacter\bBeginning/endofaword\BNotatthebeginning/endofaword\nNewlinecharacter\rCarriagereturncharacter\tTabcharacter\vVerticaltabcharacter\0NULcharacter\fFormfeedcharacter\xxxCharacterspecifiedbyanoctalnumberxxx\xddCharacterspecifiedbyanhexadecimalnumberdd\uddddUnicodecharacterspecifiedbyanhexadecimalnumberddddBrackets[xyz]Anycharacterbetweenthebrackets[^xyz]Anycharacternotbetweenthebrackets[x-z]Anycharacterfromxtoz[^x-z]NOT(Anycharacterfromxtoz)(x|y)Anyofthealternativesspecified
CyrilExisanonlineregexdebugger,itallowsyoutotestregularexpressioninPHP(PCRE),Python,Ruby,JavaScript,JavaandMySQL.Ithelpsyoutotestanddebugregexonline,youcanvisualizethematcheswhenmatchingastringagainstaregex.Aregexvisualizerallowstovisualizeyourregex,ithelpstounderstandit.Thisfeatureisusefulforlargeregexes.CyrilexalsoallowsyoutogenerateastringexamplefromaRegEx.Thisgivesaprettyquickideaofaregex.YoucanconsulttheregexQuickStartorseethefulluserguidetohelpyoutousethisregularexpressiontester.UserguideStep0:Choosetheregexengine:JavaScript,Ruby,JavaorPCRE(PHP,Python).Step1:Copyandpasteordirectlytypeyourregularexpressiontotestinthe"Regularexpressiontotest"field.Step2:Selecttheflagsyouwantin"Flags"section.Step3:Copyandpasteordirectlytypeyourteststringinthe"teststring"field.Assoonasyoumakeamodification(regularexpression,flagsorteststring):Step4:Anexplanationisgeneratedaboutofyourregex.Itusesregulex,itisaJavaScriptRegularExpressionParser&Visualizer(WritteninpureJavaScript).Step5:AmessageindicatesthenumberofcorrespondenceYourregexishighlightedaccordingtothesyntax.Itisabetaversion,itcanbewrong.Youcanalsoreplaceregularexpressionmatchesintextwithareplacementstring.Step6:Copyandpasteordirectlytypeyoursubstitutestringinthe"Substitution"field.Step7:Substitutionsareautomaticallyperformedonyourteststring.Youcansaveyourregexinordertoshareit.Youcanprotectyoursharewithapassword,soonlyyoucanchangeit.See"SaveandShare"section:GenerateastringfromRegEx(Beta):Clickson"GenerateastringfromRegEx(Beta)"inordertogenerateastringthatmatcheswiththeregex.Substitutionsarenotmanaged.News:YoucannowtestMySQLregex,selectthe"MySQL8"engine.AboutregularexpressionAregularexpressionisasequenceofcharactersthatdefineasearchpattern.Thispatternisusedbystringsearchingalgorithmsforfindorreplacetext.ItcanbeusefultovalidateanEMAILaddressoranIPaddress.Regexsupportispartofthestandardlibraryofmanyprogramminglanguages.Eachprogramminglanguagehasitsownregexengine,regularexpressionimplementationsvaryslightlybetweenlanguages.Regexhumor(JamieZawinski):Somepeople,whenconfrontedwithaproblem,think"Iknow,I'lluseregularexpressions."Nowtheyhavetwoproblems.RegexcheckerCyrilexisanonlineregexchecker,itallowstoeasilytestanddebugregex.Thisavoidswastingtimewritingthefewlinesofcodeneededtodothetests.Aregexvisualizerandaregexgeneratorhelpyoutounderstandanddebugyourregexes.Thistoolalsoallowsyoutoshareyourregularexpressions,thiscanbeusefulwhenyouwanttoexplainoneofyourregexproblems(oritsresolution)onaforum.TheunavoidablesSomeregexthatcanbeuseful(withoutwarranty).EmailaddressThelastRFCiscomplex,thereisnoreliablesolution,thisregexshouldworkmorethan99%ofthetime(Youmustturnoffcasesensitivity).^((?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\]))$AlphanumericTheregexbelowallowstovalidatealphanumericstring.Becareful,\wauthorizestheunderscorecharacter.^[a-zA-Z0-9]+$MD5TheregexbelowallowstovalidateMD5string.^[a-f0-9]{32}$IPV4TheregexbelowallowstovalidateIPv4.^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$×SaveregularexpressionYourregexhasbeenpermanentlysavedandyou(oranybody)canaccesswiththislink:×PasswordChoiceapasswordtomodify/deletethisregexlaterEnterpasswordtomodifythisregex.Enterpasswordtodeletethisregex.Enterthenewpasswordforthefork.ActionYoucanreportabugorgivefeedbackbyaddingacomment(below)orbyclicking"Contactme"link(atthetoprighthandcornerofthepage).CommentsCaptchaEnterthecode(caseinsensitive)*Ifyoucannotreadthecode,clickheretogenerateanewcodeDietmarSchindler-2020-03-1014:23Iftheexpressionisn'tunderstoodbytheengine,theerrormessageisvisibletooshortly.AlsoitwouldbeimportanttoknowwhichPythonversionisusedforthePythonRegExengine(itseemstonotunderstand"(?i:…)").Example:\b(([A-Z])([A-Z])?([A-Z])?([A-Z])?)(?:\w+){,1}\(?from.*?(?P
延伸文章資訊
- 1How to use RegEx in Google Search Console - MRS Digital
- 2Java Regular Expression Tester - FreeFormatter.com
This free Java regular expression tester lets you test your regular expressions against any entry...
- 3Online Regex tester and visualizer - ExtendsClass
CyrilEx is an online regex debugger, it allows you to test regular expression in PHP (PCRE), Pyth...
- 4Regex Tester - 工具邦
- 5Regexes are Hard: Decision-Making, Difficulties, and Risks ... - IEEE Xplore