-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
62 lines (51 loc) · 16.6 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
<!doctype html><html lang=en-us><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="ie=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><link rel=preload as=font href=https://next.pomsky-lang.org/fonts/vendor/jost/jost-v4-latin-regular.woff2 type=font/woff2 crossorigin><link rel=preload as=font href=https://next.pomsky-lang.org/fonts/vendor/jost/jost-v4-latin-500.woff2 type=font/woff2 crossorigin><link rel=preload as=font href=https://next.pomsky-lang.org/fonts/vendor/jost/jost-v4-latin-700.woff2 type=font/woff2 crossorigin><script>(()=>{var t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,e=localStorage.getItem("theme");t&&e===null&&(localStorage.setItem("theme","dark"),document.documentElement.setAttribute("data-dark-mode","")),t&&e==="dark"&&document.documentElement.setAttribute("data-dark-mode",""),e==="dark"&&document.documentElement.setAttribute("data-dark-mode","")})()</script><link rel=stylesheet href=https://next.pomsky-lang.org/main.551848e1b0589b47f25770829dd34676ce9aa878c3c98be82952d88e633582da6fdc89dd6e5ab88938c1c2aab77da38688399fddc25b5da31abb4e87ed1a299c.css integrity="sha512-VRhI4bBYm0fyV3CCndNGds6aqHjDyYvoKVLYjmM1gtpv3Indblq4iTjBwqq3faOGiDmf3cJbXaMau06H7RopnA==" crossorigin=anonymous><noscript><style>img.lazyload{display:none}</style></noscript><meta name=robots content="index, follow"><meta name=googlebot content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"><meta name=bingbot content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"><title>Pomsky - Home</title><meta name=description content="Next Level Regular Expressions"><link rel=canonical href=https://next.pomsky-lang.org/><meta property="og:locale" content="en_US"><meta property="og:type" content="website"><meta property="og:title" content="Pomsky"><meta property="og:description" content="Next Level Regular Expressions"><meta property="og:url" content="https://next.pomsky-lang.org/"><meta property="og:site_name" content="Pomsky"><meta property="og:updated_time" content="2022-05-17T13:55:00+00:00"><meta property="og:image" content="https://next.pomsky-lang.org/images/favicon.png"><meta property="og:image:alt" content="Pomsky"><meta name=twitter:card content="summary_large_image"><meta name=twitter:site content><meta name=twitter:creator content><meta name=twitter:title content="Pomsky"><meta name=twitter:description content="Next Level Regular Expressions"><meta name=twitter:image content="https://next.pomsky-lang.org/images/favicon.png"><meta name=twitter:image:alt content="Pomsky"><link rel=alternate type=application/rss+xml href=https://next.pomsky-lang.org/index.xml><script type=application/ld+json>{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://next.pomsky-lang.org/#/schema/organization/1","name":"Pomsky","url":"https://next.pomsky-lang.org/","sameAs":[],"logo":{"@type":"ImageObject","@id":"https://next.pomsky-lang.org/#/schema/image/1","url":"https://next.pomsky-lang.org/images/favicon.png","width":512,"height":512,"caption":"Pomsky"},"image":{"@id":"https://next.pomsky-lang.org/#/schema/image/1"}},{"@type":"WebSite","@id":"https://next.pomsky-lang.org/#/schema/website/1","url":"https://next.pomsky-lang.org/","name":"Pomsky","description":"Next Level Regular Expressions","publisher":{"@id":"https://next.pomsky-lang.org/#/schema/organization/1"}},{"@type":"WebPage","@id":"https://next.pomsky-lang.org/","url":"https://next.pomsky-lang.org/","name":"Pomsky","description":"Next Level Regular Expressions","isPartOf":{"@id":"https://next.pomsky-lang.org/#/schema/website/1"},"about":{"@id":"https://next.pomsky-lang.org/#/schema/organization/1"},"datePublished":"2022-05-17T13:55:00CET","dateModified":"2022-05-17T13:55:00CET","breadcrumb":{"@id":"https://next.pomsky-lang.org/#/schema/breadcrumb/1"},"primaryImageOfPage":{"@id":"https://next.pomsky-lang.org/#/schema/image/2"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https://next.pomsky-lang.org/"]}]},{"@type":"BreadcrumbList","@id":"https://next.pomsky-lang.org/#/schema/breadcrumb/1","name":"Breadcrumbs","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https://next.pomsky-lang.org/"}}]},{"@context":"https://schema.org","@graph":[{"@type":"ImageObject","@id":"https://next.pomsky-lang.org/#/schema/image/2","url":"https://next.pomsky-lang.org/images/favicon.png","contentUrl":"https://next.pomsky-lang.org/images/favicon.png","caption":"Pomsky"}]}]}</script><link rel=preconnect href=https://fonts.googleapis.com><link rel=preconnect href=https://fonts.gstatic.com crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;800&family=JetBrains+Mono:wght@400;700&display=swap" rel=stylesheet><meta name=theme-color content="#fff"><meta name=msapplication-TileColor content="#fff"><link rel=icon href=https://next.pomsky-lang.org/favicon.ico sizes=any><link rel=icon type=image/svg+xml href=https://next.pomsky-lang.org/favicon.svg><link rel=apple-touch-icon sizes=180x180 href=https://next.pomsky-lang.org/apple-touch-icon.png><link rel=manifest href=/site.webmanifest><link rel=mask-icon href=/safari-pinned-tab.svg color=#ff7d0b></head><body class=home data-bs-spy=scroll data-bs-target=#toc data-bs-root-margin="0px 0px -90%" data-bs-smooth-scroll=true tabindex=0><div class="alert alert-primary text-lg-center" role=alert>You are viewing the <b>next</b> version of this website. <a href=https://pomsky-lang.org>See current version</a></div><div class=sticky-top><div class=header-bar></div><header class="navbar navbar-expand-lg navbar-light doks-navbar"><nav class="container-xxl flex-wrap flex-lg-nowrap" aria-label="Main navigation"><a class="navbar-brand order-0" href=/ aria-label=Pomsky>Pomsky</a>
<button class="btn btn-menu order-2 d-block d-lg-none" type=button data-bs-toggle=offcanvas data-bs-target=#offcanvasDoks aria-controls=offcanvasDoks aria-label="Open main menu"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="18" x2="21" y2="18"/></svg></button><div class="offcanvas offcanvas-end border-0 py-lg-1" tabindex=-1 id=offcanvasDoks data-bs-backdrop=true aria-labelledby=offcanvasDoksLabel><div class="header-bar d-lg-none"></div><div class="offcanvas-header d-lg-none"><h2 class="h5 offcanvas-title ps-2" id=offcanvasDoksLabel><a class=text-dark href=/>Pomsky</a></h2><button type=button class="btn-close text-reset me-2" data-bs-dismiss=offcanvas aria-label="Close main menu"></button></div><div class="offcanvas-body p-4 p-lg-0"><ul class="nav flex-column flex-lg-row align-items-lg-center mt-2 mt-lg-0 ms-lg-2 me-lg-auto"><li class=nav-item><a class="nav-link ps-0 py-1" href=/docs/get-started/introduction/>Docs</a></li><li class=nav-item><a class="nav-link ps-0 py-1" href=https://playground.pomsky-lang.org/>Playground</a></li><li class=nav-item><a class="nav-link ps-0 py-1" href=/blog/>Blog</a></li><li class=nav-item><a class="nav-link ps-0 py-1" href=https://github.com/sponsors/Aloso>Donate</a></li></ul><hr class="text-black-50 my-4 d-lg-none"><form class="doks-search position-relative flex-grow-1 ms-lg-auto me-lg-2"><input id=search class="form-control is-search" type=search placeholder="Search docs..." aria-label="Search docs..." autocomplete=off><div id=suggestions class="shadow bg-white rounded d-none"></div></form><hr class="text-black-50 my-4 d-lg-none"><ul class="nav flex-column flex-lg-row"><li class=nav-item><a class="nav-link social-link" href=https://github.com/pomsky-lang/pomsky><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37.0 00-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44.0 0020 4.77 5.07 5.07.0 0019.91 1S18.73.65 16 2.48a13.38 13.38.0 00-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07.0 005 4.77 5.44 5.44.0 003.5 8.55c0 5.42 3.3 6.61 6.44 7A3.37 3.37.0 009 18.13V22"/></svg><small class="ms-2 d-lg-none">GitHub</small></a></li><li class=nav-item><a class="nav-link social-link" href=https://discord.gg/uwap2uxMFp><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentcolor" stroke="none"><path d="M16.9 3.5c-1.3-.61-2.6-1.05-4.1-1.3C12.6 2.52 12.4 2.95 12.3 3.3c-1.6-.23-3.1-.23-4.59.0-.14-.35-.35-.78-.53-1.1-1.45.25-2.84.69-4.13 1.3C.44 7.45-.27 11.3.08 15.1c1.74 1.3 3.42 2.1 5.07 2.6C5.55 17.1 5.92 16.5 6.23 15.9 5.63 15.7 5.06 15.4 4.52 15.1 4.67 15 4.81 14.8 4.94 14.7c3.26 1.6 6.86 1.6 10.16.0.1.1.2.3.4.4-.6.3-1.1.6-1.7.8.3.6.6 1.2 1.1 1.8 1.6-.5 3.3-1.3 5-2.6.4-4.4-.7-8.22-3-11.6zM6.68 12.8c-.99.0-1.8-1-1.8-2.1.0-1.11.79-2.04 1.8-2.04 1 0 1.82.92 1.82 2.04.0 1.1-.82 2.1-1.82 2.1zm6.62.0c-1 0-1.8-1-1.8-2.1.0-1.11.8-2.04 1.8-2.04s1.8.92 1.8 2.04c0 1.1-.8 2.1-1.8 2.1z"/></svg><small class="ms-2 d-lg-none">Discord</small></a></li></ul><hr class="text-black-50 my-4 d-lg-none"><button id=mode class="btn btn-link" type=button aria-label="Toggle user interface mode">
<span class=toggle-dark><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg></span><span class=toggle-light><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></span></button></div></div></nav></header></div><div class="wrap container-xxl" role=document><div class=content><section class="section container-fluid mt-n3 pb-3"><div class="row justify-content-center"><div id=landing-design><img src=/favicon.svg alt="Pomsky logo" class=front-logo><div id=landing-content><h1 class=landing-title>Pomsky</h1><p class=lead>Next Level Regular Expressions</p><div class=landing-buttons><a class="btn btn-primary btn-lg px-4" href=/docs/get-started/introduction/ role=button>Get Started</a>
<a class="btn btn-lg px-4" href=https://playground.pomsky-lang.org role=button>Playground</a></div></div></div></div></section><div style=display:none class="hljs-string hljs-variable hljs-template-variable hljs-symbol hljs-bullet hljs-addition hljs-attribute hljs-link hljs-punctuation hljs-keyword hljs-string hljs-title hljs-built_in hljs-section hljs-number hljs-meta hljs-builtin-name hljs-literal hljs-literal hljs-type hljs-params hljs-literal hljs-diff-add hljs-diff-del hljs-illegal"></div></div></div><section class="section section-sm"><div class=container><div class="row advantages justify-content-center"><div><img src=/properties/readable.svg class=advantage-img alt><h2 class=h4>Saner Syntax</h2><p>Pomsky is designed to be easy to write and understand.</p></div><div><img src=/properties/fast.svg class=advantage-img alt><h2 class=h4>Instant Feedback</h2><p>Syntax highlighting, autocompletion, and diagnostics in VSCode.</p></div><div><img src=/properties/testing.svg class=advantage-img alt><h2 class=h4>Built-in Tests</h2><p>Automated tests catch mistakes, and double as documentation.</p></div><div><img src=/properties/advanced-features.svg class=advantage-img alt><h2 class=h4>Feature Rich</h2><p>Pomsky has powerful features you won't find anywhere else.</p></div><div><img src=/properties/compatible.svg class=advantage-img alt><h2 class=h4>Great Compatibility</h2><p>Pomsky is transpiled to normal RegExp's, so you can use it anywhere.</p></div><div><img src=/properties/optimized.svg class=advantage-img alt><h2 class=h4>Optimized Output</h2><p>You can be confident that your expressions perform well.</p></div></div><h2 class=example-heading>Examples</h2><div id=examples class=hidden><div data-title=Basic data-result=Hello\s+(?:world|pomsky)>'Hello' [space]+ ('world' | 'pomsky')</div><div data-title=Boundaries data-result=^\bfoo\b$>^ % 'foo' % $</div><div data-title=Repetition data-result=(?:hello){1,5}(?:world)*>'hello'{1,5} 'world'*</div><div data-title="Character classes" data-result=[acd[\]p-s\d][^\^]>['acd[]' 'p'-'s' digit]
!['^'] # negated</div><div data-title=Unicode data-result=[\s\x15\uFEFF\p{Greek}]>[s U+15 U+FEFF Greek]</div><div data-title="Capturing groups" data-result="(\s)(?<named>.)">:([space]) :named(.)</div><div data-title=Lookaround data-result="(?<=foo|bar)(?!foo|bar)">(<< 'foo' | 'bar') (!>> 'foo' | 'bar')</div><div data-title=Ranges data-result=0|1[0-9]{0,2}|2(?:[0-4][0-9]?|5[0-5]?|[6-9])?|[3-9][0-9]?>range '0'-'255'</div><div data-title=Variables data-result=-?\d+(?:[+\-*/]-?\d+)*>let number = '-'? [digit]+;
let op = ['+-*/'];
number (op number)*</div></div><script type=module>
const examples = document.getElementById('examples')
const children = [...examples.children]
let active = 0
examples.innerHTML = `
<div class="example-tabs">
${children
.map((child, i) => {
const title = child.getAttribute('data-title')
return `<button class="example-tab" data-i="${i}">${title}</button>`
})
.join('')}
</div>
<div class="example-body">
<pre class="example-pomsky"><code class="language-pomsky">${children[0].textContent
}</code></pre>
<pre class="example-regexp"><code class="language-regexp"></code></pre>
</div>`
const tabs = [...document.querySelectorAll('.example-tabs > .example-tab')]
tabs[active].classList.add('active')
examples.classList.remove('hidden')
const pomskyCode = document.querySelector('.example-pomsky > code')
const regexpCode = document.querySelector('.example-regexp > code')
function selectTab(n) {
if (n >= children.length) n -= children.length
tabs[active].classList.remove('active')
active = n
tabs[active].classList.add('active')
pomskyCode.textContent = children[n].textContent.trim()
regexpCode.textContent = children[n].getAttribute('data-result')
if ('hljs' in window) {
hljs.highlightElement(pomskyCode)
hljs.highlightElement(regexpCode)
}
}
selectTab(0)
for (const tab of tabs) {
tab.addEventListener('click', () => {
selectTab(+tab.getAttribute('data-i'))
})
}
</script></div></section><section class="section section-sm container-fluid"><div class="row justify-content-center text-center"><div class=col-lg-9></div></div></section><footer class="footer text-muted"><div class=container-xxl><div class=row><div class="col-lg-8 order-last order-lg-first"><ul class=list-inline><li class=list-inline-item>Powered by <a class=text-muted href=https://gohugo.io/>Hugo</a> and <a class=text-muted href=https://getdoks.org/>Doks</a></li></ul></div><div class="col-lg-8 order-first order-lg-last text-lg-end"><ul class=list-inline><li class=list-inline-item><a href=/contact/>Contact</a></li><li class=list-inline-item><a href=/policies/code-of-conduct>Code of Conduct</a></li></ul></div></div></div></footer><script src=/js/bootstrap.min.49deee76074d4074d37d54619d509b36839e1aa4ebf6698c543b5d5645b355076b9713429c9a308a3b216c208da0aa3507af100fa137063b1e6aca3cc2259e27.js integrity="sha512-Sd7udgdNQHTTfVRhnVCbNoOeGqTr9mmMVDtdVkWzVQdrlxNCnJowijshbCCNoKo1B68QD6E3Bjseaso8wiWeJw==" crossorigin=anonymous defer></script>
<script src=/js/highlight.min.fb35a31cd9739d66cdf316a73d517e21d7c9650017380c3a62da85dde9c8a6d54c8a7df48339f6957317286fa5f1e85fa632c83b193f38f3458e7cae73ac4b79.js integrity="sha512-+zWjHNlznWbN8xanPVF+IdfJZQAXOAw6YtqF3enIptVMin30gzn2lXMXKG+l8ehfpjLIOxk/OPNFjnyuc6xLeQ==" crossorigin=anonymous defer></script>
<script src=/main.min.f438aa1441f336e157a1120795c9dd953c923fbc2e864b737589c0aec17ec44250d550c308a8bada8c1ce223d751a2461a59877b5665ef635fa5c9bf3448f38c.js integrity="sha512-9DiqFEHzNuFXoRIHlcndlTySP7wuhktzdYnArsF+xEJQ1VDDCKi62owc4iPXUaJGGlmHe1Zl72Nfpcm/NEjzjA==" crossorigin=anonymous defer></script>
<script src=https://next.pomsky-lang.org/index.min.6c5377f9023bff99da5e39665a9de74c83c4f743d3ce1c4d227a16a9c3b8a2ff4fb6ffd9927f07bd8cc9d4872387f30945223e1a067362038b063422a5957ba4.js integrity="sha512-bFN3+QI7/5naXjlmWp3nTIPE90PTzhxNInoWqcO4ov9Ptv/Zkn8HvYzJ1Icjh/MJRSI+GgZzYgOLBjQipZV7pA==" crossorigin=anonymous defer></script></body></html>