regex101:OnlineRegexTester,Builder,Converter&DebuggerPleaseenableJavaScripttouseregex101/^regex[\\-_]?101$/iRegularExpressions101UpgradetoProEnterpriseRegexEditorManageWorkspaceSave&SharePublishtoCommunityLibraryEditorFlavor:PCRE2(PHP)MatchSubstitutionExtractionUnitTestsPipelineNewToolsCodeGeneratorRegexDebuggerNewRegexConverterNewExportMatchesNewBenchmarkRegexNewFormatRegexNewAccountExplanationProUnderstandyourregularexpressionwithdetailedexplanationsofitstokens,groups,andflags.Regexconversionadaptspatterns,flags,andreplacementtextbetweenanysupportedflavors,withcompatibilitychecksandabreakdownofchanges.Supports:PCRE2(PHP)JavaScriptPythonGolangJava.NET10.0(C#)RustPOSIXEREPOSIXBRE(grep/sed)PCRE(Legacy)MatchInformationSeewhatmatchedandwhateachgroupcaptured,includingnamedgroupsandvaluesreusableinreplacementsorbackreferences.InvestigateunexpectedresultswiththeregexdebuggerandexportthemtoJSON,JSONLines,CSV,orPlainTextafterwards.QuickReferenceFrequentlyUsedTokens25tokensAsinglecharacterof:a,borc[abc]Acharacterexcept:a,borc[^abc]Acharacterintherange:a-z[a-z]Acharacternotintherange:a-z[^a-z]Acharacterintherange:a-zorA-Z[a-zA-Z]Anysinglecharacter.Alternate-matcheitheraorba|bAnywhitespacecharacter\\sAnynon-whitespacecharacter\\SAnydigit\\dAnynon-digit\\DAnywordcharacter\\wAnynon-wordcharacter\\WNon-capturinggroup(?:...)CapturingGroup(...)Zerooroneofaa?Zeroormoreofaa*Oneormoreofaa+Exactly3ofaa3ormoreofaaBetween3and6ofaaStartofstring^Endofstring$Awordboundary\\bNon-wordboundary\\BRegularExpression//gmInput11New