forked from haixuxu/regex102
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
81 lines (70 loc) · 33.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en" class="notranslate" translate="no">
<head>
<meta charset="UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="mobile-web-app-capable" content="yes">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="format-detection" content="telephone=no">
<meta name="title" content="regex101">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Source+Code+Pro:wght@400;500;700&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
<link rel="apple-touch-icon" sizes="57x57" href="/static/assets/icon-57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/static/assets/icon-60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/static/assets/icon-72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/static/assets/icon-76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/static/assets/icon-114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/static/assets/icon-120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/static/assets/icon-144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/static/assets/icon-152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/static/assets/icon-180.png">
<link rel="shortcut icon" href="/static/assets/favicon.ico" type="image/x-icon">
<link rel="icon" type="image/png" sizes="16x16" href="/static/assets/icon-16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/assets/icon-32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/static/assets/icon-96.png">
<link rel="icon" type="image/png" sizes="192x192" href="/static/assets/icon-192.png">
<link rel="manifest" href="/static/assets/manifest.webmanifest">
<meta name="theme-color" content="#3366a4">
<link href="https://regex101.com" rel="home" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="keywords" content="javascript,regex,regular expression,debugger,explainer,helper,tester,match,pcre,php,golang,python,editor">
<meta name="description" content="Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java. Features a regex quiz & library.">
<meta name="author" content="Firas Dib">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:site" content="@regex101">
<meta property="twitter:title" content="regex101: build, test, and debug regex">
<meta property="twitter:description" content="Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java. Features a regex quiz & library.">
<meta property="twitter:creator" content="@regex101">
<meta property="twitter:image" content="https://regex101.com/static/assets/card.png">
<meta property="twitter:domain" content="regex101.com">
<meta property="og:image" content="https://regex101.com/static/assets/card.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:title" content="regex101: build, test, and debug regex">
<meta property="og:description" content="Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java. Features a regex quiz & library.">
<meta property="og:url" content="https://regex101.com/">
<meta property="og:site_name" content="regex101">
<meta property="og:type" content="website">
<meta name="google" content="notranslate" />
<title>regex101: build, test, and debug regex</title>
<script>
var l;document.addEventListener("readystatechange",l=function(h){if("interactive"===h.target.readyState){document.removeEventListener("readystatechange",l);try{var c,d,e,a=null==(d=JSON.parse(null==(c=localStorage)?void 0:c.getItem("regex101-state")))?void 0:null==(e=d.settings)?void 0:e.theme,b,f,g,k=(null==(b=window)?0:null==(f=b.matchMedia)?0:null==(g=f.call(b,"(prefers-color-scheme: dark)"))?0:g.matches)?"dark":"light";document.body.className=a&&"AUTO"!==a?a:k}catch(m){console.error("Unable to set theme",m)}}});
</script>
<link rel="stylesheet" type="text/css" href="/static/bundle.255b0d51ce6939c8b906.css">
<script>
window.__INITIAL_STATE__ = '%7B%22rightSidebar%22%3A%7B%22activeSubsection%22%3A%22EXPLANATION%22%2C%22visibleSections%22%3A%5B%22EXPLANATION%22%2C%22MATCH_INFO%22%2C%22QUICKREF%22%5D%2C%22hiddenSections%22%3A%5B%5D%2C%22width%22%3Anull%7D%2C%22regexEditor%22%3A%7B%22flavor%22%3A%22pcre2%22%2C%22delimiter%22%3A%22%2F%22%2C%22flags%22%3A%22gm%22%2C%22regex%22%3A%22%22%2C%22testString%22%3A%22%22%2C%22matchResult%22%3A%7B%22data%22%3A%5B%5D%2C%22time%22%3A0%7D%2C%22error%22%3Anull%2C%22substString%22%3A%22%22%2C%22listSubstString%22%3A%22%22%2C%22hasUnsavedData%22%3Atrue%2C%22regexVersions%22%3A0%2C%22showMatchArea%22%3Atrue%2C%22showSubstitutionArea%22%3Afalse%2C%22showUnitTestArea%22%3Afalse%2C%22showListSubstitutionArea%22%3Afalse%7D%2C%22settings%22%3A%7B%22maxExecutionTime%22%3A2000%2C%22theme%22%3A%22AUTO%22%2C%22nonParticipatingGroups%22%3Afalse%2C%22displayWhitespace%22%3Atrue%2C%22colorizeSyntax%22%3Atrue%2C%22autoComplete%22%3Afalse%2C%22wrapLines%22%3Atrue%2C%22testAreaLineNumbers%22%3Afalse%2C%22regexAreaLineNumbers%22%3Afalse%2C%22language%22%3A%22ENGLISH%22%2C%22storageSaved%22%3Anull%2C%22storageLoaded%22%3Anull%2C%22editorTooltips%22%3Atrue%2C%22alwaysCollapseLeftSidebar%22%3Afalse%2C%22alwaysCollapseRightSidebar%22%3Afalse%2C%22defaultFlavor%22%3A%22pcre2%22%2C%22showWarningUnsavedProgress%22%3Atrue%2C%22defaultCodeGenLanguage%22%3A%22%22%2C%22calculateRegexSteps%22%3Atrue%2C%22defaultTabBehavior%22%3Atrue%7D%2C%22unitTests%22%3A%7B%22tests%22%3A%5B%5D%2C%22testsRunning%22%3Afalse%7D%2C%22general%22%3A%7B%22permalinkFragment%22%3Anull%2C%22version%22%3Anull%2C%22deleteCode%22%3Anull%2C%22userId%22%3Anull%2C%22email%22%3Anull%2C%22profilePicture%22%3Anull%2C%22serviceProvider%22%3Anull%2C%22isFavorite%22%3Afalse%2C%22isLibraryEntry%22%3Afalse%2C%22title%22%3Anull%2C%22documentTitle%22%3A%22build%2C%20test%2C%20and%20debug%20regex%22%2C%22metaDescription%22%3A%22Regular%20expression%20tester%20with%20syntax%20highlighting%2C%20explanation%2C%20cheat%20sheet%20for%20PHP%2FPCRE%2C%20Python%2C%20GO%2C%20JavaScript%2C%20Java.%20Features%20a%20regex%20quiz%20%26%20library.%22%2C%22tags%22%3A%5B%5D%2C%22cookie%22%3A%22%22%2C%22sponsorData%22%3Anull%2C%22currentTheme%22%3A%22AUTO%22%2C%22permalinkIsEditable%22%3Atrue%2C%22isOwner%22%3Afalse%7D%2C%22account%22%3A%7B%22data%22%3A%5B%5D%2C%22pages%22%3A0%2C%22allTags%22%3A%5B%5D%2C%22staleData%22%3Atrue%7D%2C%22regexLibrary%22%3A%7B%22libraryData%22%3A%5B%5D%2C%22pages%22%3A0%2C%22details%22%3Anull%7D%2C%22libraryEntry%22%3A%7B%22title%22%3Anull%2C%22description%22%3Anull%2C%22author%22%3Anull%7D%2C%22quiz%22%3A%7B%22allTasks%22%3A%5B%5D%2C%22mostRecentTaskIdx%22%3Anull%7D%2C%22regexAreaParser%22%3A%7B%22tokens%22%3A%5B%5D%2C%22subpatterns%22%3A%5B%5D%2C%22captureGroupMap%22%3A%7B%7D%2C%22captureGroupCount%22%3A0%2C%22status%22%3Anull%2C%22definedSubpatterns%22%3A%5B%5D%7D%7D';
</script>
<link rel="preload" href="/static/quickref.f015563d30d5bebfc613.chunk.js" as="script" />
<link rel="preload" href="/static/4.6270dcbf0cdce57476a3.css" as="style" />
<script src="/static/vendors-bundle.eecaaa1f0bc02123d56e.chunk.js" defer></script>
<script src="/static/bundle.6a3c272393fa26f729a5.js" defer></script>
<script defer>
function c(){try{var a;if(a="Worker"in window)a:{if("object"===typeof WebAssembly&&"function"===typeof WebAssembly.instantiate){var b=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(b instanceof WebAssembly.Module){a=new WebAssembly.Instance(b)instanceof WebAssembly.Instance;break a}}a=!1}if(!a)return!0}catch(d){return!0}return!1}(function(){if(c()){var a;window.addEventListener("load",a=function(){window.removeEventListener("load",a);document.body.innerHTML='<div style="padding: 60px; max-width: 600px;margin: 0 auto; text-align: center; font-size: 20px; line-height: 1.5;"> <div><p>Unfortunately it seems your browser does not meed the criteria to properly render and utilize this website. You need a browser with support for web workers and Web Assembly.</p><a href="http://browsehappy.com/" style="color: blue;">Please upgrade your browser and come back</a></div></div>'})}})();
</script>
</head>
<body class="light">
<div id="regex-app"><div class="ShQg3"><header class="_3XoJ3"><h1><a href="/" class="_1k1Ay zA-6I _1UVmI _1mk1E" rel="noopener" tabindex="0" aria-label="regular expressions 101"><span class="_38RZ7">Regular</span> <span class="_1oN2R">Expressions</span> <span class="_1xMNo">101</span></a></h1><div class="_2rqsz"><a href="https://twitter.com/regex101" class="_1k1Ay _2sHtm" rel="noopener" target="_blank" aria-label="Follow me on twitter!"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_1Y9d0 _3icJz" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M22.162 5.656a8.384 8.384 0 0 1-2.402.658A4.196 4.196 0 0 0 21.6 4c-.82.488-1.719.83-2.656 1.015a4.182 4.182 0 0 0-7.126 3.814 11.874 11.874 0 0 1-8.62-4.37 4.168 4.168 0 0 0-.566 2.103c0 1.45.738 2.731 1.86 3.481a4.168 4.168 0 0 1-1.894-.523v.052a4.185 4.185 0 0 0 3.355 4.101 4.21 4.21 0 0 1-1.89.072A4.185 4.185 0 0 0 7.97 16.65a8.394 8.394 0 0 1-6.191 1.732 11.83 11.83 0 0 0 6.41 1.88c7.693 0 11.9-6.373 11.9-11.9 0-.18-.005-.362-.013-.54a8.496 8.496 0 0 0 2.087-2.165z"></path></g></svg><span class="_1iL9z">@regex101</span></a><div style="display:none"><div></div></div><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=firas%2edib%40gmail%2ecom&lc=US&item_name=Regex101&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest" class="_1k1Ay _2sHtm" rel="noopener" target="_blank" aria-label="Like regex101? Support it by donating!"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_1Y9d0 _1rpnz" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><path d="M15.999,8.5h2c0-2.837-2.755-4.131-5-4.429V2h-2v2.071c-2.245,0.298-5,1.592-5,4.429c0,2.706,2.666,4.113,5,4.43V17.9 c-1.448-0.251-3-1.024-3-2.4h-2c0,2.589,2.425,4.119,5,4.436v1.063V22h2v-1.001V19.93c2.245-0.298,5-1.593,5-4.43 s-2.755-4.131-5-4.429V6.1C14.329,6.339,15.999,7.041,15.999,8.5z M7.999,8.5c0-1.459,1.67-2.161,3-2.4v4.799 C9.628,10.646,7.999,9.897,7.999,8.5z M15.999,15.5c0,1.459-1.67,2.161-3,2.4V13.1C14.329,13.339,15.999,14.041,15.999,15.5z"></path></svg><span class="_1iL9z">Donate</span></a><div style="display:none"><div></div></div><a href="https://github.com/sponsors/firasdib" class="_1k1Ay _2sHtm" rel="noopener" target="_blank" aria-label="Become a sponsor!"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_1Y9d0 _2EzQx" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0H24V24H0z"></path><path d="M12.001 4.529c2.349-2.109 5.979-2.039 8.242.228 2.262 2.268 2.34 5.88.236 8.236l-8.48 8.492-8.478-8.492c-2.104-2.356-2.025-5.974.236-8.236 2.265-2.264 5.888-2.34 8.244-.228z"></path></g></svg><span class="_1iL9z">Sponsor</span></a><div style="display:none"><div></div></div><a href="mailto:[email protected]" class="_1k1Ay _2sHtm" rel="noopener" target="_blank" aria-label="Send me an email"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_1Y9d0 _2DHqG" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm9.06 8.683L5.648 6.238 4.353 7.762l7.72 6.555 7.581-6.56-1.308-1.513-6.285 5.439z"></path></g></svg><span class="_1iL9z">Contact</span></a><div style="display:none"><div></div></div><a href="https://github.com/firasdib/Regex101/issues" class="_1k1Ay _2sHtm" rel="noopener" target="_blank" aria-label="Bugs or suggestions go here"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_1Y9d0 _2WGgf" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"></path></svg><span class="_1iL9z">Bug Reports & Feedback</span></a><div style="display:none"><div></div></div><a href="https://github.com/firasdib/Regex101/wiki" class="_1k1Ay _2sHtm" rel="noopener" target="_blank" aria-label="Wiki (Info & FAQ)"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_1Y9d0 lAofk" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zM11 14v2h2v-2h-2zM8.567 8.813l1.962.393A1.5 1.5 0 1 1 12 11h-1v2h1a3.5 3.5 0 1 0-3.433-4.187z"></path></g></svg><span class="_1iL9z">Wiki</span></a><div style="display:none"><div></div></div><a href="/static/assets/changelog.txt" class="_1k1Ay _2sHtm" rel="noopener" target="_blank" aria-label="Whats new?"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_1Y9d0 _3E3bO" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M19 22H5a3 3 0 0 1-3-3V3a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v7h4v9a3 3 0 0 1-3 3zm-1-10v7a1 1 0 0 0 2 0v-7h-2zM5 6v6h6V6H5zm0 7v2h10v-2H5zm0 3v2h10v-2H5zm2-8h2v2H7V8z"></path></g></svg><span class="_1iL9z">Whats new?</span></a><div style="display:none"><div></div></div></div><div style="display:none"><div class="_89aMF"></div></div></header><div class="_2YI6R"><nav class="_3lGRy"><a aria-current="page" class="_1k1Ay _2VP9G _1TwxM _1HG5I" style="width:34px;height:34px" aria-label="Regex Editor" href="/"><span class="_25R77">Regex Editor</span><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_134fb" height="18" width="18" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"></path></g></svg></a><div style="display:none"><div></div></div><a class="_1k1Ay _2VP9G _1TwxM" style="width:34px;height:34px" aria-label="Regex Library" href="/library"><span class="_25R77">Regex Library</span><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 512 512" class="_134fb" height="18" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M64 480H48a32 32 0 01-32-32V112a32 32 0 0132-32h16a32 32 0 0132 32v336a32 32 0 01-32 32zm176-304a32 32 0 00-32-32h-64a32 32 0 00-32 32v28a4 4 0 004 4h120a4 4 0 004-4zM112 448a32 32 0 0032 32h64a32 32 0 0032-32v-30a2 2 0 00-2-2H114a2 2 0 00-2 2z"></path><rect width="128" height="144" x="112" y="240" rx="2" ry="2"></rect><path d="M320 480h-32a32 32 0 01-32-32V64a32 32 0 0132-32h32a32 32 0 0132 32v384a32 32 0 01-32 32zm175.89-34.55l-32.23-340c-1.48-15.65-16.94-27-34.53-25.31l-31.85 3c-17.59 1.67-30.65 15.71-29.17 31.36l32.23 340c1.48 15.65 16.94 27 34.53 25.31l31.85-3c17.59-1.67 30.65-15.71 29.17-31.36z"></path></svg></a><div style="display:none"><div></div></div><a class="_1k1Ay _2VP9G _1TwxM" style="width:34px;height:34px" aria-label="Account" href="/account"><span class="_25R77">Account</span><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_134fb" height="18" width="18" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M4 22a8 8 0 1 1 16 0H4zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6z"></path></g></svg></a><div style="display:none"><div></div></div><a class="_1k1Ay _2VP9G _1TwxM" style="width:34px;height:34px" aria-label="Regex Quiz" href="/quiz"><span class="_25R77">Regex Quiz</span><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_134fb" height="18" width="18" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M17 4a6 6 0 0 1 6 6v4a6 6 0 0 1-6 6H7a6 6 0 0 1-6-6v-4a6 6 0 0 1 6-6h10zm-7 5H8v2H6v2h1.999L8 15h2l-.001-2H12v-2h-2V9zm8 4h-2v2h2v-2zm-2-4h-2v2h2V9z"></path></g></svg></a><div style="display:none"><div></div></div><a class="_1k1Ay _2VP9G _1TwxM" style="width:34px;height:34px" aria-label="Settings" href="/settings"><span class="_25R77">Settings</span><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_134fb" height="18" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"></path></svg></a><div style="display:none"><div></div></div><a href="https://web.libera.chat/?nick=re101-guest-?&chan=#regex" class="_1k1Ay _2VP9G _1TwxM" rel="noopener" style="width:34px;height:34px" target="_blank" aria-label="Live Help"><span class="_25R77">Live Help</span><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_134fb" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M16.8 19L14 22.5 11.2 19H6a1 1 0 0 1-1-1V7.103a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1V18a1 1 0 0 1-1 1h-5.2zM2 2h17v2H3v11H1V3a1 1 0 0 1 1-1z"></path></g></svg></a><div style="display:none"><div></div></div><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=firas%2edib%40gmail%2ecom&lc=US&item_name=Regex101&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest" class="_1k1Ay _2VP9G _1Z6QO" rel="noopener" style="bottom:54px;width:34px;height:34px" target="_blank" aria-label="Consider a donation"><span class="_25R77">Consider a donation</span><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_134fb" height="18" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M15.999,8.5h2c0-2.837-2.755-4.131-5-4.429V2h-2v2.071c-2.245,0.298-5,1.592-5,4.429c0,2.706,2.666,4.113,5,4.43V17.9 c-1.448-0.251-3-1.024-3-2.4h-2c0,2.589,2.425,4.119,5,4.436v1.063V22h2v-1.001V19.93c2.245-0.298,5-1.593,5-4.43 s-2.755-4.131-5-4.429V6.1C14.329,6.339,15.999,7.041,15.999,8.5z M7.999,8.5c0-1.459,1.67-2.161,3-2.4v4.799 C9.628,10.646,7.999,9.897,7.999,8.5z M15.999,15.5c0,1.459-1.67,2.161-3,2.4V13.1C14.329,13.339,15.999,14.041,15.999,15.5z"></path></svg></a><div style="display:none"><div></div></div><a href="https://github.com/sponsors/firasdib" class="_1k1Ay _2VP9G _2Xag6" rel="noopener" style="width:34px;height:34px" target="_blank" aria-label="Become a sponsor"><span class="_25R77">Become a sponsor</span><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_134fb" height="18" width="18" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0H24V24H0z"></path><path d="M12.001 4.529c2.349-2.109 5.979-2.039 8.242.228 2.262 2.268 2.34 5.88.236 8.236l-8.48 8.492-8.478-8.492c-2.104-2.356-2.025-5.974.236-8.236 2.265-2.264 5.888-2.34 8.244-.228z"></path></g></svg></a><div style="display:none"><div></div></div></nav><div class="_3Zgg2"><div class="_2j5VS"><div class="RRbkN _2etnl"><h2 class="_3lNwh O0-Hf _1eJ4W _1X-Gs"><span class="O0-Hf">Save & Share</span></h2><ul class="_1vcMU"><li class="_2RLnO _3uC-c _2xJy1 CfA7P" aria-disabled="true" role="button" tabindex="-1" disabled=""><div class="jBTzJ _227oo _3gLCM _2cPke"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M18 21v-8H6v8H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h13l4 4v13a1 1 0 0 1-1 1h-2zm-2 0H8v-6h8v6z"></path></g></svg><div class="_2tWLT">Save Regex</div><div class="_1LtHx">ctrl+s</div></div></li></ul></div><div class="RRbkN _2etnl"><h2 class="_3lNwh O0-Hf _1eJ4W _1X-Gs"><span class="O0-Hf">Flavor</span></h2><ul class="_1vcMU"><li class="_2RLnO _2xJy1" role="button" tabindex="0"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"></path></g></svg><div class="_2igRx _1AoXx"><div class="_1mqYT">PCRE2 (PHP >=7.3)</div><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_1NGf1" height="16" width="16" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z"></path></g></svg></div></div></li><li class="_2RLnO _2xJy1" role="button" tabindex="0"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"></path></g></svg><div class="_2igRx"><div class="_1mqYT">PCRE (PHP <7.3)</div></div></div></li><li class="_2RLnO _2xJy1" role="button" tabindex="0"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"></path></g></svg><div class="_2igRx"><div class="_1mqYT">ECMAScript (JavaScript)</div></div></div></li><li class="_2RLnO _2xJy1" role="button" tabindex="0"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"></path></g></svg><div class="_2igRx"><div class="_1mqYT">Python</div></div></div></li><li class="_2RLnO _2xJy1" role="button" tabindex="0"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"></path></g></svg><div class="_2igRx"><div class="_1mqYT">Golang</div></div></div></li><li class="_2RLnO _2xJy1" role="button" tabindex="0"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"></path></g></svg><div class="_2igRx"><div class="_1mqYT">Java 8</div></div></div></li></ul></div><div class="RRbkN _2etnl"><h2 class="_3lNwh O0-Hf _1eJ4W _1X-Gs"><span class="O0-Hf">Function</span></h2><ul class="_1vcMU"><li class="_2RLnO _2xJy1" role="button" tabindex="0"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M11 12l-7.071 7.071-1.414-1.414L8.172 12 2.515 6.343 3.929 4.93 11 12zm0 7h10v2H11v-2z"></path></g></svg><div class="_2igRx _1AoXx"><div class="_1mqYT">Match</div><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="_1NGf1" height="16" width="16" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z"></path></g></svg></div></div></li><li class="_2RLnO _2xJy1" role="button" tabindex="0"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M9.683 7.562L12 9.88l6.374-6.375a2 2 0 0 1 2.829 0l.707.707L9.683 16.438a4 4 0 1 1-2.121-2.121L9.88 12 7.562 9.683a4 4 0 1 1 2.121-2.121zM6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm9.535-6.587l6.375 6.376-.707.707a2 2 0 0 1-2.829 0l-4.96-4.961 2.12-2.122z"></path></g></svg><div class="_2igRx"><div class="_1mqYT">Substitution</div></div></div></li><li class="_2RLnO _2xJy1" role="button" tabindex="0"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M2 18h7v2H2v-2zm0-7h9v2H2v-2zm0-7h20v2H2V4zm18.674 9.025l1.156-.391 1 1.732-.916.805a4.017 4.017 0 0 1 0 1.658l.916.805-1 1.732-1.156-.391c-.41.37-.898.655-1.435.83L19 21h-2l-.24-1.196a3.996 3.996 0 0 1-1.434-.83l-1.156.392-1-1.732.916-.805a4.017 4.017 0 0 1 0-1.658l-.916-.805 1-1.732 1.156.391c.41-.37.898-.655 1.435-.83L17 11h2l.24 1.196c.536.174 1.024.46 1.434.83zM18 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"></path></g></svg><div class="_2igRx"><div class="_1mqYT">List</div></div></div></li><li class="_2RLnO _2xJy1" role="button" tabindex="0"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0H24V24H0z"></path><path d="M17 2v2h-1v14c0 2.21-1.79 4-4 4s-4-1.79-4-4V4H7V2h10zm-4 13c-.552 0-1 .448-1 1s.448 1 1 1 1-.448 1-1-.448-1-1-1zm-2-3c-.552 0-1 .448-1 1s.448 1 1 1 1-.448 1-1-.448-1-1-1zm3-8h-4v4h4V4z"></path></g></svg><div class="_2igRx"><div class="_1mqYT">Unit Tests </div></div></div></li></ul></div><div class="_2etnl"><h2 class="_3lNwh O0-Hf _1eJ4W _1X-Gs"><span class="O0-Hf">Tools</span></h2><ul class="_1vcMU"><li class="_2xJy1 CfA7P"><a class="_1k1Ay _3RyEf" tabindex="-1" href="/codegen?language=php"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.57 1.14l3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13l.5-.5h7.72l.35.14zM10 5h3l-3-3v3zM3 2v12h10V6H9.5L9 5.5V2H3zm2.062 7.533l1.817-1.828L6.17 7 4 9.179v.707l2.171 2.174.707-.707-1.816-1.82zM8.8 7.714l.7-.709 2.189 2.175v.709L9.5 12.062l-.705-.709 1.831-1.82L8.8 7.714z"></path></svg>Code Generator</div></a></li><li class="_2xJy1 CfA7P"><a class="_1k1Ay _3RyEf" tabindex="-1" href="/debugger"><div class="jBTzJ _227oo"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="H4T9K" height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M6.056 8.3a7.01 7.01 0 0 1 .199-.3h11.49c.069.098.135.199.199.3l2.02-1.166 1 1.732-2.213 1.278c.162.59.249 1.213.249 1.856v1h3v2h-3c0 .953-.19 1.862-.536 2.69l2.5 1.444-1 1.732-2.526-1.458A6.992 6.992 0 0 1 13 21.929V14h-2v7.93a6.992 6.992 0 0 1-4.438-2.522l-2.526 1.458-1-1.732 2.5-1.443A6.979 6.979 0 0 1 5 15H2v-2h3v-1c0-.643.087-1.265.249-1.856L3.036 8.866l1-1.732L6.056 8.3zM8 6a4 4 0 1 1 8 0H8z"></path></g></svg>Regex Debugger</div></a></li></ul></div><div style="display:none"><div class="_89aMF"></div></div><div style="display:none"><div class="_89aMF"></div></div><div style="display:none"><div class="_89aMF"></div></div></div><div class="_3Brs_ _2C1Ky"><div class="_3ypF1">Sponsor</div><a href="https://www.layer0.co/?utm_medium=referral&utm_source=regex101&utm_campaign=regex101" class="_1k1Ay zA-6I VgjYl" rel="nofollow noopener" target="_blank"><div class="_2tlsS">Jamstack at Scale</div></a></div></div></div><div class="_33Rze"><div class="_1sPdi"><div class="_3_sYH" style="width:nullpx"><div class="_4858E lRCRT"></div><div class="_3PpcT _2q0Oh _2MW9d"><button class="_2RLnO" type="button"><h2 class="_3lNwh O0-Hf _1eJ4W cB6Tt _3ixV5 _-6u0a"><span class="O0-Hf">Explanation</span><span class="_3I6B7 _1Ar88 _1QLwI"></span></h2></button><div class="_10pZW _3hmoB"><div class="_3rxK6">An explanation of your regex will be automatically generated as you type.</div></div></div><div class="_3PpcT _2q0Oh _2MW9d"><button class="_2RLnO" type="button"><h2 class="_3lNwh O0-Hf _1eJ4W cB6Tt _3ixV5 _-6u0a"><span class="O0-Hf">Match Information</span><span class="_3I6B7 _1Ar88 _1QLwI"></span></h2></button><div class="_10pZW _3hmoB"><div class="_3rxK6">Detailed match information will be displayed here automatically.</div></div></div><div class="_3PpcT _2q0Oh"><button class="_2RLnO" type="button"><h2 class="_3lNwh O0-Hf _1eJ4W cB6Tt _3ixV5 _-6u0a"><span class="O0-Hf">Quick Reference</span><span class="_3I6B7 _1Ar88 _1QLwI"></span></h2></button><div class="_10pZW _3hmoB"><div><div class="_14IXr"><div class="_2GR8V _3fgDv" aria-label="Loading..."></div></div></div></div></div></div><div class="_3iTu7"><div class="_2BE7j"><div class="_15vRC"><h2 class="_3lNwh _1eJ4W"><span class="">Regular Expression</span><div style="display:none"><div></div></div><div class="_31Vga _3xBxP" aria-label="">No Match</div><div style="display:none"><div></div></div></h2></div><div class="RJ8Yc"><div class="_2RLnO _1q0hf" aria-disabled="false" aria-label="Change delimiter" role="button" tabindex="0"><div class="_2xZiZ"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 192 512" class="_3ZHcw" height="12" width="12" xmlns="http://www.w3.org/2000/svg"><path d="M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z"></path></svg>/</div><div style="display:none"><div></div></div></div><div style="display:none"><div></div></div><div class="WCiKD _20lwE"><div class="CodeMirror-show-whitespace" translate="no"><textarea style="display:none" autoComplete="off" translate="no"></textarea></div><div style="display:none"><div></div></div></div><div class="_2RLnO kSfD0" aria-label="Set Regex Options" role="button" tabindex="0"><div class="_1I9eC"><div class="_210Q8">/</div><div class="_2UDrm">gm</div></div><div style="display:none"><div></div></div></div><div style="display:none"><div></div></div><button class="_2RLnO _3uC-c _2Xobd _1MXB2 _2jyKx" aria-disabled="true" id="copybutton-208739" data-text="//gm" aria-label="Copy to clipboard" tabindex="-1" disabled="" type="button"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" height="16" width="16" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1.001 1.001 0 0 1 3 21l.003-14c0-.552.45-1 1.007-1H7zM5.003 8L5 20h10V8H5.003zM9 6h8v10h2V4H9v2z"></path></g></svg></button><div style="display:none"><div></div></div></div></div><div class="_3S3Zl"><div class="RwyGz"><div class="_1ZChz"><h2 class="_3lNwh O0-Hf _1eJ4W"><span class="O0-Hf">Test String</span></h2><div class="VZ-Pw"><div class="_3iTAJ CodeMirror-show-whitespace" translate="no"><textarea style="display:none" autoComplete="off" translate="no"></textarea></div></div></div><div class="_3WOkv"></div></div></div></div><div style="display:none"><div class="zQ2Fe"></div></div><div style="display:none"><div class="zQ2Fe"></div></div><div style="display:none"><div class="_89aMF"></div></div></div></div><div class="_2J-VG"><div class="_2XpGe"><div class="_3XoJ3"><h1><a href="/" class="_1k1Ay zA-6I _1UVmI _1awVL" rel="noopener" tabindex="-1" aria-label="regular expressions 101"><span class="_38RZ7">Regular</span> <span class="_1oN2R">Expressions</span> <span class="_1xMNo">101</span></a></h1></div><div class="_1ldsr"><div class="_2GR8V _3fgDv" aria-label="Loading..."></div><div class="_27cUW">Please wait while the app is loading...</div></div><noscript><a href="http://enable-javascript.com/" class="_1k1Ay zA-6I" rel="noopener">Please enable JavaScript to use this web application.</a></noscript></div></div></div></div>
</body>
</html>