Regular Expressions 101

Save & Share

  • Regex Version: ver. 89
  • Update Regex
    ctrl+⇧+s
  • Save new Regex
    ctrl+s
  • Add to Community Library

Flavor

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8
  • .NET 7.0 (C#)
  • Rust
  • Regex Flavor Guide

Function

  • Match
  • Substitution
  • List
  • Unit Tests

Tools

Sponsors
There are currently no sponsors. Become a sponsor today!
An explanation of your regex will be automatically generated as you type.
Detailed match information will be displayed here automatically.
  • All Tokens
  • Common Tokens
  • General Tokens
  • Anchors
  • Meta Sequences
  • Quantifiers
  • Group Constructs
  • Character Classes
  • Flags/Modifiers
  • Substitution
  • A single character of: a, b or c
    [abc]
  • A character except: a, b or c
    [^abc]
  • A character in the range: a-z
    [a-z]
  • A character not in the range: a-z
    [^a-z]
  • A character in the range: a-z or A-Z
    [a-zA-Z]
  • Any single character
    .
  • Alternate - match either a or b
    a|b
  • Any whitespace character
    \s
  • Any non-whitespace character
    \S
  • Any digit
    \d
  • Any non-digit
    \D
  • Any word character
    \w
  • Any non-word character
    \W
  • Non-capturing group
    (?:...)
  • Capturing group
    (...)
  • Zero or one of a
    a?
  • Zero or more of a
    a*
  • One or more of a
    a+
  • Exactly 3 of a
    a{3}
  • 3 or more of a
    a{3,}
  • Between 3 and 6 of a
    a{3,6}
  • Start of string
    ^
  • End of string
    $
  • A word boundary
    \b
  • Non-word boundary
    \B

Regular Expression
No Match

r"
"
mgi

Test String

Code Generator

Generated Code

using System; using System.Text.RegularExpressions; public class Example { public static void Main() { string pattern = @"((?:^\s*)([\w#.@*,:\-.:>,*\s]+)\s*{(?:[\s]*)((?:[A-Za-z\- \s]+[:]\s*['""0-9\w .,\/()\-!%]+;?)*)*\s*}(?:\s*))"; string input = @"/* This is the base css style sheet for adoc Studio based on the Stylesheet for Asciidoctor available at: https://github.com/asciidoctor/asciidoctor/tree/main/src/stylesheets Author: Frank Blome for ProjectWizards GmbH License: Distributed under the permissive MIT license */ :root { /* Fonts: Use as few fonts as possible to achieve a homogeneous appearance of the document. */ --body-font: serif; /* For all text */ --headline-font: sans-serif; /* For all headlines */ --monospaced-font: monospace; /* For all verbatim or literals */ --toc-font: sans-serif; /* For the table of contents */ /* Colors: The default colors are based on the default styles for Asciidoctor. Modifications: - All colors are transfered into a variable (the naming should be obvious) - A dark version was added. - Some minor color changes based on our taste - Shadows on admonition icons and other symbols are removed */ --color: #101010; /* base color for all text */ --color-dark: #f1f1f1; /* dark variant of the base color */ --background-color: #ffffff; /* base color for the background */ --background-color-dark: #121212; /* dark variant of the background color */ --headline-color: #ba3925; /* base color for all headline */ --headline-color-dark: #ba3925; /* dark variant for the headlines */ --headline-block-color: #7a2518; /* headline color for any blocks */ --headline-block-color-dark: #b52812; /* dark variant for the block headlines */ --headline-small-color: #e99b8f; /* color for small headlines */ --headline-small-color-dark: #b0746b; /* dark variant for the small headlines */ --mark-background-color: #ffff00; /* Text marker with the same in dark mode */ --a-color: #2156a5; /* all kind of links */ --a-color-dark: #2c72db; /* dark variant of the links */ --a-hover-color: #1d4b8f; /* hover variant of the links */ --a-hover-color-dark: #1d4b8f; /* dark variant of links hover */ --single-border-color: #ddd; /* Mainly for single lines */ --border-color: rgb(0 0 0 / 0.6); /* Light variant for some transparent borders */ --border-color-dark: rgb(255 255 255 / 0.1); /* Dark variant for all borders */ --details-color: rgb(0 0 0 / 0.85); /* Some borders needs to be less transparent */ --details-color-dark: rgb(255 255 255 / 0.85); /* dark variant of these borders */ /* Colors for tables */ --table-border-color: #ccc; --table-background-color: #fff; --table-background-color-dark: #212121; --table-head-background-color: #f7f8f7; --table-head-background-color-dark: #323232; --table-alternate-background-color: #f8f8f7; --table-alternate-background-color-dark: #f8f8f7; --table-stripes-background-color: #f7f8f7; --table-stripes-background-color-dark: #323232; --linenotable-background-color: none; --linenotable-background-color-dark: none; /* Colors for various kinds of blocks */ --code-color: rgb(0 0 0 / 0.9); --code-color-dark: rgb(255 255 255 / 0.9); --quote-color: rgb(0 0 0 / 0.85); --quote-color-dark: rgb(255 255 255 / 0.85); --pre-color: green; --pre-color-dark: #eee; --pre-background-color: #f7f7f8; --pre-background-color-dark: #7f7f7f; --exampleblock-background-color: #ffffff; --exampleblock-background-color-dark: #121212; --sidebar-background-color: #f3f3f2; --sidebar-background-color-dark: #3f3f3f; --listingblock-background-color: #f7f7f8; --listingblock-background-color-dark: #7f7f7f; --listingblock-output-background-color: rgb(0 0 0 / 0.9); --listingblock-output-background-color-dark: #7f7f7f; /* Colors for the UI elements */ --kbd-background-color: #f7f7f7; --kbd-background-color-dark: #bababa; --kbd-border-color: #ccc; --kbd-border-color-dark: rgb(0 0 0 / 0.8); --kbd-color: rgb(0 0 0 / 0.8); --kbd-color-dark: rgb(0 0 0 / 0.8); --keyseq-color: rgb(51 51 51 / 0.8); --keyseq-color-dark: rgb(255 255 255 / 0.1); --menu-color: #000; --menu-color-dark: #eee; /* Colors for the Table of contents */ --toc-background-color: #f8f8f7; --toc-border-color: #e7e7e9; --toc-background-color-dark: #323232; --toc2-background-color: #f8f8f7; --toc2-background-color-dark: #323232; /* Colors for the Footer */ --footer-background-color: rgb(0 0 0 / 0.8); --footer-background-color-dark: rgb(100 100 100 / 0.4); /* Colors for Pretty Print */ --prettyprint-background-color: #f7f7f8; --prettyprint-background-color-dark: #7f7f7f; --prettyprint-list-background-color: none; --prettyprint-list-background-color-dark: none; /* Admonitions: The background color is unused in the base style. It is prepared for a style similar to Apple Calendar with dark/light colors */ --admonitionblock-background-color: none; --admonitionblock-background-color-dark: none; --note-color: #1962d1; --note-border-color: #1962d1; --note-background-color: #b8d4ff; --tip-color: #ebd005; --tip-border-color: #ebd005; --tip-background-color: #fcf3ae; --warning-color: #fc9803; --warning-border-color: #fc9803; --warning-background-color: #fae1bb; --caution-color: #cf2604; --caution-border-color: #cf2604; --caution-background-color: #fadbd4; --important-color: #800101; --important-border-color: #800101; --important-background-color: #fbd0d0; /* Standard color definitions: can be used as classes for colouring the text */ --aqua-color: #00fafa; --aqua-color-dark: #446666; --aqua-background-color: #00fafa; --aqua-background-color-dark: #446666; --black-color: #000; --black-color-dark: #eee; --black-background-color: #000; --black-background-color-dark: #eee; --blue-color: #0000bf; --blue-color-dark: #575778; --blue-background-color: #0000bf; --blue-background-color-dark: #575778; --fuchsia-color: #fa00fa; --fuchsia-color-dark: #575778; --fuchsia-background-color: #fa00fa; --fuchsia-background-color-dark: #575778; --gray-color: #7d7d7d; --gray-color-dark: #7d7d7d; --gray-background-color: #7d7d7d; --gray-background-color-dark: #7d7d7d; --green-color: #007d00; --green-color-dark: #007d00; --green-background-color: #007d00; --green-background-color-dark: #007d00; --lime-color: #00fa00; --lime-color-dark: #00fa00; --lime-background-color: #00fa00; --lime-background-color-dark: #00fa00; --maroon-color: #7d0000; --maroon-color-dark: #7d0000; --maroon-background-color: #7d0000; --maroon-background-color-dark: #7d0000; --navy-color: #00007d; --navy-color-dark: #00007d; --navy-background-color: #00007d; --navy-background-color-dark: #00007d; --olive-color: #7d7d00; --olive-color-dark: #616100; --olive-background-color: #7d7d00; --olive-background-color-dark: #616100; --orange-color: #FF9300; --orange-color-dark: #C37C2D; --orange-background-color: #FF9300; --orange-background-color-dark: #C37C2D; --purple-color: #7d007d; --purple-ccolor-dark: #660066; --purple-background-color: #7d007d; --purple-background-color-dark: #660066; --red-color: #fa0000; --red-color-dark: #b00000; --red-background-color: #fa0000; --red-background-color-dark: #b00000; --silver-color: #bcbcbc; --silver-color-dark: #878787; --silver-background-color: #bcbcbc; --silver-background-color-dark: #878787; --teal-color: #007d7d; --teal-color-dark: #006969; --teal-background-color: #007d7d; --teal-background-color-dark: #006969; --white-color: #fafafa; --white-color-dark: #3b3b3b; --white-background-color: #fafafa; --white-background-color-dark: #3b3b3b; --yellow-color: #fafa00; --yellow-color-dark: #adad00; --yellow-background-color: #fafa00; --yellow-background-color-dark: #adad00; } /*** End of the vars ***/ *, ::before, ::after { box-sizing: border-box; } html { font-size: 100%; /* the the users default font size as the basis */ -webkit-text-size-adjust: 100%; hyphens: auto; -webkit-hyphens: auto; } body { /* Here are many default values inherited to others */ background: var(--background-color); color: var(--color); padding: 0; margin: 0; font-family: var(--body-font); /* Standard font */ font-size: inherit; /* Font size from <html> */ line-height: 1; /* Standard line height */ position: relative; /* The main anchor for all postion:absolute elements */ cursor: auto; /* show the default cursor based on the detail */ tab-size: 4; /* for formatting code */ word-wrap: anywhere; /* do word wrap wherever it's possible & needed */ -moz-osx-font-smoothing: grayscale; /* how to antialias the fonts in... */ -webkit-font-smoothing: antialiased; /* ... different browsers */ } @media (prefers-color-scheme: dark) { /* this is how all dark variants are done */ body { /* modifying only the colors, the rest remains the same */ background: var(--background-color-dark); color: var(--color-dark); } } dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, p, blockquote, th, td { margin: 0; padding: 0; } a { background: none; color: var(--a-color); text-decoration: underline; line-height: inherit; } @media (prefers-color-scheme: dark) { a { color: var(--a-color-dark); } } a:active, a:hover { cursor: pointer; outline: 0; } a:focus { outline: thin dotted; } a:hover, a:focus { color: var(--a-color-hover); } @media (prefers-color-scheme: dark) { a:hover, a:focus { color: var(--a-hover-color-dark); } } abbr { font-size: 0.9em; } abbr[title] { cursor: help; border-bottom: 1px dotted var(--single-border-color); text-decoration: none; } b, strong { font-weight: bold; line-height: inherit; } strong strong { font-weight: 400; } code, kbd, pre { /* Sizes and other font variables are inherited from body and need not be listed again. Only changed attributes are listed: */ font-family: var(--monospaced-font); } code { font-weight: normal; color: var(--code-color); } @media (prefers-color-scheme: dark) { code { color: var(--code-color-dark); } } pre { color: var(--code-color); line-height: 1.45; text-rendering: optimizeSpeed; white-space: pre-wrap; } @media (prefers-color-scheme: dark) { pre { color: var(--code-color-dark); } } dfn { font-style: italic; } em, i { font-style: italic; line-height: inherit; } em em { /* em in em gets back to normal */ font-style: normal; } hr { border: solid var(--single-border-color); border-width: 1px 0 0; clear: both; height: 0; margin: 1.25em 0 1.1875em; } /* The dark varian of mark is the same as the blight variant So there is no definition for dark mode */ mark { background: var(--mark-background-color); color: var(--color); } p { line-height: 1.6; margin-bottom: 1.6em; /* rem is relative to the root definition in <html> */ text-rendering: optimizeLegibility; /* hanging-punctuation: first force-end; */ } q { quotes: ""\201C"" ""\201D"" ""\2018"" ""\2019""; } small { font-size: 60%; line-height: inherit; } sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } img, object[type^=""image/""], svg { display: inline-block; height: auto; max-width: 100%; vertical-align: middle; } img { border: 0; -ms-interpolation-mode: bicubic; } object { max-width: 100%; } svg:not(:root) { overflow: hidden; } figure { margin: 0; } audio, video { display: inline-block; } audio:not([controls]) { display: none; height: 0; } /*** Standards for usage in classes ***/ .left { float: left !important; } .right { float: right !important; } .text-left { text-align: left !important; } .text-right { text-align: right !important; } .text-center { text-align: center !important; } .text-justify { text-align: justify !important; } .hide { display: none; } /*** Title-Definitions ***/ .subheader, .admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { line-height: 1.45; color: var(--headline-block-color); font-weight: 400; margin-top: 0; margin-bottom: 0.25em; } @media (prefers-color-scheme: dark) { .subheader, .admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { color: var(--headline-block-color-dark); } } p aside { font-size: 0.875em; line-height: 1.35; font-style: italic; } h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { font-family: var(--headline-font); font-weight: 300; font-style: normal; color: var(--headline-color); text-rendering: optimizeLegibility; margin-bottom: 0.5em; word-spacing: -0.05em; } @media (prefers-color-scheme: dark) { h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 { color: var(--headline-color-dark); } } h1 small, h2 small, h3 small, #toctitle small, .sidebarblock > .content > .title small, h4 small, h5 small, h6 small { color: var(--headline-small-color); line-height: 0; } @media (prefers-color-scheme: dark) { h1 small, h2 small, h3 small, #toctitle small, .sidebarblock > .content > .title small, h4 small, h5 small, h6 small { color: var(--headline-small-color-dark); } } h1 { font-size: 2.125em; } h2 { font-size: 1.6875em; } h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.375em; } h4, h5 { font-size: 1.125em; } h6 { font-size: 1em; } ul, ol, dl { line-height: 1.6; margin-bottom: 1.25em; list-style-position: outside; } ul, ol { margin-left: 1.5em; } ul li ul, ul li ol { margin-left: 1.25em; margin-bottom: 0; } ul.square li ul, ul.circle li ul, ul.disc li ul { list-style: inherit; } ul.square { list-style-type: square; } ul.circle { list-style-type: circle; } ul.disc { list-style-type: disc; } ol li ul, ol li ol { margin-left: 1.25em; margin-bottom: 0; } dl dt { margin-bottom: 0.3125em; font-weight: bold; } dl dd { margin-bottom: 1.25em; margin-left: 1.125em; } blockquote { margin: 0 0 1.25em; padding: 0.5625em 1.25em 0 1.1875em; border-left: 1px solid var(--single-border-color); } blockquote, blockquote p { line-height: 1.6; color: var(--quote-color); } @media (prefers-color-scheme: dark) { blockquote, blockquote p { color: var(--quote-color-dark); } } @media screen and (min-width: 768px) { h1 { font-size: 2.75em; } h2 { font-size: 2.3125em; } h3, #toctitle, .sidebarblock > .content > .title { font-size: 1.6875em; } h4 { font-size: 1.4375em; } } table { background: var(--table-background-color); border: 1px solid var(--single-border-color); border-collapse: collapse; border-spacing: 0; margin-bottom: 1.25em; word-wrap: normal; } @media (prefers-color-scheme: dark) { table { background: var(--table-background-color-dark); } } table thead, table tfoot { background: var(--table-head-background-color); } @media (prefers-color-scheme: dark) { table thead, table tfoot { background: var(--table-head-background-color-dark); } } table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td { padding: 0.5em 0.625em 0.625em; font-size: inherit; color: var(--color); text-align: left; } @media (prefers-color-scheme: dark) { table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td { color: var(--color-dark); } } table tr th, table tr td { padding: 0.5625em 0.625em; font-size: inherit; color: var(--color); } @media (prefers-color-scheme: dark) { table tr th, table tr td { color: var(--color-dark); } } table tr.even, table tr.alt { background: var(--table-alternate-background-color); } @media (prefers-color-scheme: dark) { table tr.even, table tr.alt { background: var(--table-alternate-background-color-dark); } } table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td { line-height: 1.6; } h1 strong, h2 strong, h3 strong, #toctitle strong, .sidebarblock > .content > .title strong, h4 strong, h5 strong, h6 strong { font-weight: 400; } .center { margin-left: auto; margin-right: auto; } .stretch { width: 100%; } .clearfix::before, .clearfix::after, .float-group::before, .float-group::after { content: ""; display: table; } .clearfix::after, .float-group::after { clear: both; } :not(pre).nobreak { word-wrap: normal; } :not(pre).nowrap { white-space: nowrap; } :not(pre).pre-wrap { white-space: pre-wrap; } :not(pre):not([class^=L]) > code { font-size: 0.9375em; font-style: normal !important; letter-spacing: 0; padding: 0.1em 0.5ex; word-spacing: -0.15em; background: var(--pre-background-color); border-radius: 4px; line-height: 1.45; text-rendering: optimizeSpeed; } @media (prefers-color-scheme: dark) { :not(pre):not([class^=L]) > code { background: var(--pre-background-color-dark); } } pre code, pre pre { color: inherit; font-size: inherit; line-height: inherit; } pre > code { display: block; } pre.nowrap, pre.nowrap pre { white-space: pre; word-wrap: normal; } .keyseq { color: var(--keyseq-color); } @media (prefers-color-scheme: dark) { .keyseq { color: var(--keyseq-color-dark); } } kbd { display: inline-block; color: var(--kbd-color); font-size: 0.65em; line-height: 1.5; background: var(--kbd-background-color); border: 1px solid var(--kbd-border-color); border-radius: 3px; box-shadow: 0 1px 1px rgb(0 0 0 / 0.2), 0 0 0 0.1em white inset; margin: 0 0.2em; padding: 0.2em 0.5em; vertical-align: middle; position: relative; top: -0.1em; white-space: nowrap; } @media (prefers-color-scheme: dark) { kbd { color: var(--kbd-color-dark); background: var(--kbd-background-color-dark); } } .keyseq kbd:first-child { margin-left: 0; } .keyseq kbd:last-child { margin-right: 0; } .menuseq, .menuref { color: var(--menu-color); } @media (prefers-color-scheme: dark) { .menuseq, .menuref { color: var(--menu-color-dark); } } .menuseq b:not(.caret), .menuref { font-weight: inherit; } .menuseq { word-spacing: -0.02em; } .menuseq b.caret { font-size: 1.25em; line-height: 0.8; } .menuseq i.caret { font-weight: bold; text-align: center; width: 0.45em; } b.button::before, b.button::after { position: relative; top: -1px; font-weight: 400; } b.button::before { content: ""[""; padding: 0 3px 0 2px; } b.button::after { content: ""]""; padding: 0 2px 0 3px; } p a > code:hover { color: var(--color); } @media (prefers-color-scheme: dark) { p a > code:hover { color: var(--color-dark); } } body > div[id] { margin: 0 auto; max-width: 62.5em; position: relative; padding-left: 0.9375em; padding-right: 0.9375em; width: 100%; } @media screen { /* This original asciidoctor rule leads to empty PDF pages when paginating. Therefore we limited it to screen use only */ body > div[id]::before, body > div[id]::after, #content #footnotes::before { content: ""; display: table; clear: both; } } #content { margin-top: 1.25em; margin-bottom: 0.625em; } #content::before { content: none; } #header > h1:first-child { color: var(--headline-color); margin-top: 2.25rem; margin-bottom: 0; } @media (prefers-color-scheme: dark) { #header > h1:first-child { color: var(--headline-color-dark); } } #header > h1:first-child + #toc { margin-top: 8px; border-top: 1px solid var(--single-border-color); } #header > h1:only-child, body.toc2 #header > h1:nth-last-child(2) { border-bottom: 1px solid var(--single-border-color); padding-bottom: 8px; } #header .details { border-bottom: 1px solid var(--single-border-color); padding-top: 0.25em; padding-bottom: 0.5em; padding-left: 0.25em; color: var(--details-color); display: flex; flex-flow: row wrap; } @media (prefers-color-scheme: dark) { #header .details { color: var(--details-color-dark); } } #header .details span:first-child { margin-left: -0.125em; } #header .details span.email a { color: var(--details-color); } @media (prefers-color-scheme: dark) { #header .details span.email a { color: var(--details-color-dark); } } #header .details br { display: none; } #header .details br + span::before { content: ""\00a0\2013\00a0""; } #header .details br + span.author::before { content: ""\00a0\22c5\00a0""; color: var(--details-color); } @media (prefers-color-scheme: dark) { #header .details br + span.author::before { color: var(--details-color-dark); } } #header .details br + span#revremark::before { content: ""\00a0|\00a0""; } #header #revnumber { text-transform: capitalize; } #header #revnumber::after { content: ""\00a0""; } #content > h1:first-child:not([class]) { color: var(--details-color); border-bottom: 1px solid var(--single-border-color); padding-bottom: 8px; margin-top: 0; padding-top: 1rem; margin-bottom: 1.25rem; } @media (prefers-color-scheme: dark) { #content > h1:first-child:not([class]) { color: var(--details-color-dark); } } #toc { border-bottom: 1px solid var(--toc-border-color); padding-bottom: 0.5em; } #toc > ul { margin-left: 0.125em; } #toc ul.sectlevel0 > li > a { font-style: italic; } #toc ul.sectlevel0 ul.sectlevel1 { margin: 0.5em 0; } #toc ul { font-family: var(--toc-font); list-style-type: none; } #toc li { line-height: 1.3334; margin-top: 0.3334em; } #toc a { text-decoration: none; } #toc a:active { text-decoration: underline; } #toctitle { color: var(--headline-block-color); font-size: 1.2em; } @media (prefers-color-scheme: dark) { #toctitle { color: var(--headline-block-color-dark); } } @media screen and (min-width: 768px) { #toctitle { font-size: 1.375em; } body.toc2 { padding-left: 15em; padding-right: 0; } #toc.toc2 { margin-top: 0 !important; background: var(--toc2-background-color); position: fixed; width: 15em; left: 0; top: 0; border-right: 1px solid var(--toc-border-color); border-top-width: 0 !important; border-bottom-width: 0 !important; z-index: 1000; padding: 1.25em 1em; height: 100%; overflow: auto; } @media (prefers-color-scheme: dark) { #toc.toc2 { background: var(--background-toc2-color-dark); } } #toc.toc2 #toctitle { margin-top: 0; margin-bottom: 0.8rem; font-size: 1.2em; } #toc.toc2 > ul { font-size: 0.9em; margin-bottom: 0; } #toc.toc2 ul ul { margin-left: 0; padding-left: 1em; } #toc.toc2 ul.sectlevel0 ul.sectlevel1 { padding-left: 0; margin-top: 0.5em; margin-bottom: 0.5em; } body.toc2.toc-right { padding-left: 0; padding-right: 15em; } body.toc2.toc-right #toc.toc2 { border-right-width: 0; border-left: 1px solid #e7e7e9; left: auto; right: 0; } } @media screen and (min-width: 1280px) { body.toc2 { padding-left: 20em; padding-right: 0; } #toc.toc2 { width: 20em; } #toc.toc2 #toctitle { font-size: 1.375em; } #toc.toc2 > ul { font-size: 0.95em; } #toc.toc2 ul ul { padding-left: 1.25em; } body.toc2.toc-right { padding-left: 0; padding-right: 20em; } } #content #toc { border: 1px solid var(--single-border-color); margin-bottom: 1.25em; padding: 1.25em; background: var(--background-toc-color); border-radius: 4px; } @media (prefers-color-scheme: dark) { #content #toc { background: var(--background-toc-color-dark); } } #content #toc > :first-child { margin-top: 0; } #content #toc > :last-child { margin-bottom: 0; } #footer { max-width: none; background: var(--footer-background-color); padding: 1.25em; } @media (prefers-color-scheme: dark) { #footer { background: var(--footer-background-color-dark); } } #footer-text { color: var(--color-dark); /* Use the dark color as the inverted color */ line-height: 1.44; } @media (prefers-color-scheme: dark) { #footer-text { color: var(--color); /* Use the light color as the inverted color */ } } .sect1 { padding-bottom: 0.625em; } @media screen and (min-width: 768px) { #content { margin-bottom: 1.25em; } .sect1 { padding-bottom: 1.25em; } } .sect1:last-child { padding-bottom: 0; } /* FB: Temporarily deactivated .sect1 + .sect1 { border-top: 1px solid #e7e7e9; } */ #content h1 > a.anchor, h2 > a.anchor, h3 > a.anchor, #toctitle > a.anchor, .sidebarblock > .content > .title > a.anchor, h4 > a.anchor, h5 > a.anchor, h6 > a.anchor { position: absolute; z-index: 1001; width: 1.5ex; margin-left: -1.5ex; display: block; text-decoration: none !important; visibility: hidden; text-align: center; font-weight: 400; } #content h1 > a.anchor::before, h2 > a.anchor::before, h3 > a.anchor::before, #toctitle > a.anchor::before, .sidebarblock > .content > .title > a.anchor::before, h4 > a.anchor::before, h5 > a.anchor::before, h6 > a.anchor::before { content: ""\00A7""; font-size: 0.85em; display: block; padding-top: 0.1em; } #content h1:hover > a.anchor, #content h1 > a.anchor:hover, h2:hover > a.anchor, h2 > a.anchor:hover, h3:hover > a.anchor, #toctitle:hover > a.anchor, .sidebarblock > .content > .title:hover > a.anchor, h3 > a.anchor:hover, #toctitle > a.anchor:hover, .sidebarblock > .content > .title > a.anchor:hover, h4:hover > a.anchor, h4 > a.anchor:hover, h5:hover > a.anchor, h5 > a.anchor:hover, h6:hover > a.anchor, h6 > a.anchor:hover { visibility: visible; } #content h1 > a.link, h2 > a.link, h3 > a.link, #toctitle > a.link, .sidebarblock > .content > .title > a.link, h4 > a.link, h5 > a.link, h6 > a.link { color: var(--headline-color); text-decoration: none; } @media (prefers-color-scheme: dark) { #content h1 > a.link, h2 > a.link, h3 > a.link, #toctitle > a.link, .sidebarblock > .content > .title > a.link, h4 > a.link, h5 > a.link, h6 > a.link { color: var(--headline-color-dark); } } #content h1 > a.link:hover, h2 > a.link:hover, h3 > a.link:hover, #toctitle > a.link:hover, .sidebarblock > .content > .title > a.link:hover, h4 > a.link:hover, h5 > a.link:hover, h6 > a.link:hover { color: var(--a-hover-color); } @media (prefers-color-scheme: dark) { #content h1 > a.link:hover, h2 > a.link:hover, h3 > a.link:hover, #toctitle > a.link:hover, .sidebarblock > .content > .title > a.link:hover, h4 > a.link:hover, h5 > a.link:hover, h6 > a.link:hover { color: var(--a-hover-color-dark); } } details, .audioblock, .imageblock, .literalblock, .listingblock, .stemblock, .videoblock { margin-bottom: 1.25em; } details { margin-left: 1.25rem; } details > summary { cursor: pointer; display: block; position: relative; line-height: 1.6; margin-bottom: 0.625rem; outline: none; -webkit-tap-highlight-color: transparent; } details > summary::-webkit-details-marker { display: none; } details > summary::before { content: ""; border: solid transparent; border-left-color: currentColor; /* TODO: Verstehe ich nicht. */ border-width: 0.3em 0 0.3em 0.5em; position: absolute; top: 0.5em; left: -1.25rem; transform: translateX(15%); } details[open] > summary::before { border: solid transparent; border-top-color: currentColor; /* TODO: Verstehe ich nicht. */ border-width: 0.5em 0.3em 0; transform: translateY(15%); } details > summary::after { content: ""; width: 1.25rem; height: 1em; position: absolute; top: 0.3em; left: -1.25rem; } .admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { text-rendering: optimizeLegibility; text-align: left; font-family: var(--headline-font); font-size: 1rem; font-style: italic; } table.tableblock.fit-content > caption.title { white-space: nowrap; width: 0; } .paragraph.lead > p, #preamble > .sectionbody > [class=paragraph]:first-of-type p { font-size: 1.15em; /* .lead should be 15% bigger than the normal font */ line-height: 1.6; color: var(--details-color); } @media (prefers-color-scheme: dark) { .paragraph.lead > p, #preamble > .sectionbody > [class=paragraph]:first-of-type p { color: var(--details-color-dark); } } /* fb: Added a few non typical but useful text formats to the basis. */ .allcaps { text-transform: uppercase; } .smallcaps { font-variant: small-caps; } .more-spacing { letter-spacing: 0.05em; } .less-spacing { letter-spacing: -0.05em; } .admonitionblock > table { border-collapse: separate; border: 0; background: var(--admonitionblock-background-color); width: 100%; } @media (prefers-color-scheme: dark) { .admonitionblock > table { background: var(--admonitionblock-background-color-dark); } } .admonitionblock > table td.icon { text-align: center; width: 80px; font-weight: normal; } .admonitionblock > table td.icon img { max-width: none; } .admonitionblock > table td.icon .title { font-weight: 600; font-family: var(--headline-font); text-transform: uppercase; } .admonitionblock > table td.content { padding-left: 1.125em; padding-right: 1.25em; border-left: 1px solid var(--single-border-color); color: var(--color); word-wrap: anywhere; } @media (prefers-color-scheme: dark) { .admonitionblock > table td.content { color: var(--color-dark); } } .admonitionblock > table td.content > :last-child > :last-child { margin-bottom: 0; } .exampleblock > .content { border: 1px solid var(--single-border-color); margin-bottom: 1.25em; padding: 1.25em; background: var(--background-exampleblock-color); border-radius: 4px; box-shadow: 0 1px 4px #e0e0dc; } @media (prefers-color-scheme: dark) { .exampleblock > .content { background: var(--background-exampleblock-color-dark); } } .exampleblock > .content > :first-child { margin-top: 0; } .exampleblock > .content > :last-child { margin-bottom: 0; } .sidebarblock { border: 1px solid var(--single-border-color); margin-bottom: 1.25em; padding: 1.25em; background: var(--background-sidebar-color); border-radius: 4px; } @media (prefers-color-scheme: dark) { .sidebarblock { background: var(--background-sidebar-color-dark); } } .sidebarblock > :first-child { margin-top: 0; } .sidebarblock > :last-child { margin-bottom: 0; } .sidebarblock > .content > .title { color: var(--headline-block-color); margin-top: 0; text-align: center; } @media (prefers-color-scheme: dark) { .sidebarblock > .content > .title { color: var(--headline-block-color-dark); } } .exampleblock > .content > :last-child > :last-child, .exampleblock > .content .olist > ol > li:last-child > :last-child, .exampleblock > .content .ulist > ul > li:last-child > :last-child, .exampleblock > .content .qlist > ol > li:last-child > :last-child, .sidebarblock > .content > :last-child > :last-child, .sidebarblock > .content .olist > ol > li:last-child > :last-child, .sidebarblock > .content .ulist > ul > li:last-child > :last-child, .sidebarblock > .content .qlist > ol > li:last-child > :last-child { margin-bottom: 0; } .literalblock pre, .listingblock > .content > pre { border-radius: 4px; overflow-x: auto; padding: 1em; font-size: 0.8125em; } @media screen and (min-width: 768px) { .literalblock pre, .listingblock > .content > pre { font-size: 0.90625em; } } @media screen and (min-width: 1280px) { .literalblock pre, .listingblock > .content > pre { font-size: 1em; } } .literalblock pre, .listingblock > .content > pre:not(.highlight), .listingblock > .content > pre[class=highlight], .listingblock > .content > pre[class^=""highlight ""] { background: var(--listingblock-background-color); } @media (prefers-color-scheme: dark) { .literalblock pre, .listingblock > .content > pre:not(.highlight), .listingblock > .content > pre[class=highlight], .listingblock > .content > pre[class^=""highlight ""] { background: var(--background-listingblock-color-dark); } } .literalblock.output pre { color: var(--pre-color); background: var(--background-listingblock-color); } @media (prefers-color-scheme: dark) { .literalblock.output pre { color: var(--pre-color-dark); background: var(--background-listingblock-color-dark); } } .listingblock > .content { position: relative; } .listingblock code[data-lang]::before { display: none; content: attr(data-lang); position: absolute; font-size: 0.75em; top: 0.425rem; right: 0.5rem; line-height: 1; text-transform: uppercase; color: inherit; opacity: 0.5; } .listingblock:hover code[data-lang]::before { display: block; } .listingblock.terminal pre .command::before { content: attr(data-prompt); padding-right: 0.5em; color: inherit; opacity: 0.5; } .listingblock.terminal pre .command:not([data-prompt])::before { content: ""$""; } .listingblock pre.highlightjs { padding: 0; } .listingblock pre.highlightjs > code { padding: 1em; border-radius: 4px; } .listingblock pre.prettyprint { border-width: 0; } .prettyprint { background: var(--prettyprint-background-color); } @media (prefers-color-scheme: dark) { .prettyprint { background: var(--prettyprint-background-color-dark); } } pre.prettyprint .linenums { line-height: 1.45; margin-left: 2em; } pre.prettyprint li { background: var(--prettyprint-list-background-color); list-style-type: inherit; padding-left: 0; } @media (prefers-color-scheme: dark) { pre.prettyprint li { background: var(--prettyprint-list-background-color-dark); } } pre.prettyprint li code[data-lang]::before { opacity: 1; } pre.prettyprint li:not(:first-child) code[data-lang]::before { display: none; } table.linenotable { border-collapse: separate; border: 0; margin-bottom: 0; background: var(--linenotable-background-color); } @media (prefers-color-scheme: dark) { table.linenotable { background: var(--linenotable-background-color-dark); } } table.linenotable td[class] { color: inherit; vertical-align: top; padding: 0; line-height: inherit; white-space: normal; } table.linenotable td.code { padding-left: 0.75em; } table.linenotable td.linenos { width: 0.01%; } table.linenotable td.linenos, pre.pygments .linenos, pre.rouge .linenos { border-right: 1px solid; opacity: 0.35; padding-right: 0.5em; user-select: none; } pre.pygments span.linenos, pre.rouge span.linenos { display: inline-block; margin-right: 0.75em; } .quoteblock { margin: 0 1em 1.25em 1.5em; display: table; } .quoteblock:not(.excerpt) > .title { margin-left: -1.5em; margin-bottom: 0.75em; } .quoteblock blockquote, .quoteblock p { color: var(--quote-color); font-size: 1.15rem; word-spacing: -0.05em; line-height: 1.4; font-style: italic; text-align: justify; } @media (prefers-color-scheme: dark) { .quoteblock blockquote, .quoteblock p { color: var(--quote-color-dark); } } .quoteblock blockquote { margin: 0; padding: 0; border: 0; } .quoteblock blockquote::before { content: ""\201c""; float: left; font-size: 2.75em; font-weight: bold; line-height: 0.5em; margin-left: -0.6em; color: var(--headline-block-color); } @media (prefers-color-scheme: dark) { .quoteblock blockquote::before { color: var(--headline-block-color-dark); } } .quoteblock blockquote > .paragraph:last-child p { margin-bottom: 0; } .quoteblock .attribution { margin-top: 0.75em; margin-right: 0.5ex; text-align: right; } .verseblock { margin: 0 1em 1.25em; } .verseblock pre { font-family: var(--body-font); color: var(--pre-color); font-weight: normal; } @media (prefers-color-scheme: dark) { .verseblock pre { color: var(--pre-color-dark); } } .verseblock pre strong { font-weight: normal; } .verseblock .attribution { margin-top: 1.25rem; margin-left: 0.5ex; } .quoteblock .attribution, .verseblock .attribution { font-style: italic; } .quoteblock .attribution br, .verseblock .attribution br { display: none; } .quoteblock .attribution cite, .verseblock .attribution cite { display: block; letter-spacing: -0.025em; color: var(--quote-color); } @media (prefers-color-scheme: dark) { .quoteblock .attribution cite, .verseblock .attribution cite { color: var(--quote-color-dark); } } .quoteblock.abstract blockquote::before, .quoteblock.excerpt blockquote::before, .quoteblock .quoteblock blockquote::before { display: none; } .quoteblock.abstract { margin: 0 1em 1.25em; display: block; } .quoteblock.abstract > .title { margin: 0 0 0.375em; font-size: 1.15em; text-align: center; } .quoteblock.excerpt > blockquote, .quoteblock .quoteblock { padding: 0 0 0.25em 1em; border-left: 0.25em solid var(--single-border-color); } .quoteblock.excerpt, .quoteblock .quoteblock { margin-left: 0; } .quoteblock.excerpt blockquote, .quoteblock.excerpt p, .quoteblock .quoteblock blockquote, .quoteblock .quoteblock p { color: var(--quote-color); font-size: 1.0625rem; } .quoteblock.excerpt .attribution, .quoteblock .quoteblock .attribution { color: inherit; font-size: 0.85rem; text-align: left; margin-right: 0; } p.tableblock:last-child { margin-bottom: 0; } td.tableblock > .content { margin-bottom: 1.25em; word-wrap: anywhere; } td.tableblock > .content > :last-child { margin-bottom: -1.25em; } table.tableblock, th.tableblock, td.tableblock { border: 0 solid var(--table-border-color); } table.grid-all > * > tr > * { border-width: 1px; } table.grid-cols > * > tr > * { border-width: 0 1px; /* For: Top+Bottom Left+Right*/ } table.grid-rows > * > tr > * { border-width: 1px 0; } table.frame-all { border-width: 1px; } table.frame-ends { border-width: 1px 0; } table.frame-sides { border-width: 0 1px; } table.frame-none > colgroup + * > :first-child > *, table.frame-sides > colgroup + * > :first-child > * { border-top-width: 0; } table.frame-none > :last-child > :last-child > *, table.frame-sides > :last-child > :last-child > * { border-bottom-width: 0; } table.frame-none > * > tr > :first-child, table.frame-ends > * > tr > :first-child { border-left-width: 0; } table.frame-none > * > tr > :last-child, table.frame-ends > * > tr > :last-child { border-right-width: 0; } table.stripes-all > * > tr, table.stripes-odd > * > tr:nth-of-type(odd), table.stripes-even > * > tr:nth-of-type(even), table.stripes-hover > * > tr:hover { background: var(--table-stripes-background-color); } @media (prefers-color-scheme: dark) { table.stripes-all > * > tr, table.stripes-odd > * > tr:nth-of-type(odd), table.stripes-even > * > tr:nth-of-type(even), table.stripes-hover > * > tr:hover { background: var(--table-stripes-background-color-dark); } } th.halign-left, td.halign-left { text-align: left; } th.halign-right, td.halign-right { text-align: right; } th.halign-center, td.halign-center { text-align: center; } th.valign-top, td.valign-top { vertical-align: top; } th.valign-bottom, td.valign-bottom { vertical-align: bottom; } th.valign-middle, td.valign-middle { vertical-align: middle; } table thead th, table tfoot th { font-weight: bold; } tbody tr th { background: var(--background-table-head-color); } @media (prefers-color-scheme: dark) { tbody tr th { background: var(--background-table-head-color-dark); } } tbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p { color: var(--color); font-weight: bold; } @media (prefers-color-scheme: dark) { tbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p { color: var(--color-dark); } } p.tableblock > code:only-child { background: var(--background-linenotable-color); padding: 0; } @media (prefers-color-scheme: dark) { p.tableblock > code:only-child { background: var(--background-linenotable-color-dark); } } p.tableblock { font-size: 1em; /* text-align: left; < Fix for Issue #343 */ } ul li ol { margin-left: 1.5em; } dl dd:last-child, dl dd:last-child > :last-child { margin-bottom: 0; } li p, ul dd, ol dd, .olist .olist, .ulist .ulist, .ulist .olist, .olist .ulist { margin-bottom: 0.625em; } ul.checklist, ul.none, ol.none, ul.no-bullet, ol.no-bullet, ol.unnumbered, ul.unstyled, ol.unstyled { list-style-type: none; } ul.no-bullet, ol.no-bullet, ol.unnumbered { margin-left: 0.625em; } ul.unstyled, ol.unstyled { margin-left: 0; } li > p:empty:only-child::before { content: ""; display: inline-block; } ul.checklist > li > p:first-child { margin-left: -1em; } ul.checklist > li > p:first-child > .fa-square-o:first-child, ul.checklist > li > p:first-child > .fa-check-square-o:first-child { width: 1.25em; font-size: 0.8em; position: relative; bottom: 0.125em; } ul.checklist > li > p:first-child > input[type=checkbox]:first-child { font: inherit; margin: 0 0.25em 0 0; padding: 0; } ul.inline { display: flex; flex-flow: row wrap; list-style: none; margin: 0 0 0.625em -1.25em; } ul.inline > li { margin-left: 1.25em; } .unstyled dl dt { font-weight: 400; font-style: normal; } ol.arabic { list-style-type: decimal; } ol.decimal { list-style-type: decimal-leading-zero; } ol.loweralpha { list-style-type: lower-alpha; } ol.upperalpha { list-style-type: upper-alpha; } ol.lowerroman { list-style-type: lower-roman; } ol.upperroman { list-style-type: upper-roman; } ol.lowergreek { list-style-type: lower-greek; } .hdlist > table, .colist > table { border: 0; background: var(--background-linenotable-color); } @media (prefers-color-scheme: dark) { .hdlist > table, .colist > table { background: var(--background-linenotable-color-dark); } } .hdlist > table > tbody > tr, .colist > table > tbody > tr { background: var(--background-linenotable-color); } @media (prefers-color-scheme: dark) { .hdlist > table > tbody > tr, .colist > table > tbody > tr { background: var(--background-linenotable-color-dark); } } td.hdlist1, td.hdlist2 { vertical-align: top; padding: 0 0.625em; } td.hdlist1 { font-weight: bold; padding-bottom: 1.25em; } td.hdlist2 { word-wrap: anywhere; } .literalblock + .colist, .listingblock + .colist { margin-top: -0.5em; } .colist td:not([class]):first-child { padding: 0.4em 0.75em 0; line-height: 1; vertical-align: top; } .colist td:not([class]):first-child img { max-width: none; } .colist td:not([class]):last-child { padding: 0.25em 0; } .thumb, .th { line-height: 0; display: inline-block; border: 4px solid #fff; box-shadow: 0 0 0 1px #ddd; } .imageblock.left { margin: 0.25em 0.625em 0.25em 0; } .imageblock.right { margin: 0.25em 0 0.25em 0.625em; } .imageblock > .title { margin-bottom: 0; } .imageblock.thumb, .imageblock.th { border-width: 6px; } .imageblock.thumb > .title, .imageblock.th > .title { padding: 0 0.125em; } .image.left, .image.right { margin-top: 0.25em; margin-bottom: 0.25em; display: inline-block; line-height: 0; } .image.left { margin-right: 0.625em; } .image.right { margin-left: 0.625em; } a.image { text-decoration: none; display: inline-block; } a.image object { pointer-events: none; } sup.footnote, sup.footnoteref { font-size: 0.875em; position: static; vertical-align: super; } sup.footnote a, sup.footnoteref a { text-decoration: none; } sup.footnote a:active, sup.footnoteref a:active { text-decoration: underline; } #footnotes { padding-top: 0.75em; padding-bottom: 0.75em; margin-bottom: 0.625em; } #footnotes hr { width: 20%; min-width: 6.25em; margin: -0.25em 0 0.75em; border-width: 1px 0 0; } #footnotes .footnote { padding: 0 0.375em 0 0.225em; line-height: 1.3334; font-size: 0.875em; margin-left: 1.2em; margin-bottom: 0.2em; } #footnotes .footnote a:first-of-type { font-weight: bold; text-decoration: none; margin-left: -1.05em; } #footnotes .footnote:last-of-type { margin-bottom: 0; } #content #footnotes { margin-top: -0.625em; margin-bottom: 0; padding: 0.75em 0; } div.page-break { display: none; } div.unbreakable { page-break-inside: avoid; } .big { font-size: larger; } .small { font-size: smaller; } .underline { text-decoration: underline; } .overline { text-decoration: overline; } .line-through { text-decoration: line-through; } /******************************************************************* Standard color usage: the classes are each for light and dark mode. ********************************************************************/ .aqua { color: var(--aqua-color); } @media (prefers-color-scheme: dark) { .aqua { color: var(--aqua-color-dark); } } .aqua-background { background: var(--aqua-background-color); } @media (prefers-color-scheme: dark) { .aqua-background { background: var(--aqua-background-color-dark); } } .black { color: var(--black-color); } @media (prefers-color-scheme: dark) { .black { color: var(--black-color-dark); } } .black-background { background: var(--black-background-color); } @media (prefers-color-scheme: dark) { .black-background { background: var(--black-background-color-dark); } } .blue { color: var(--blue-color); } @media (prefers-color-scheme: dark) { .blue { color: var(--blue-color-dark); } } .blue-background { background: var(--blue-background-color); } @media (prefers-color-scheme: dark) { .blue-background { background: var(--blue-background-color-dark); } } .fuchsia { color: var(--fuchsia-color); } @media (prefers-color-scheme: dark) { .fuchsia { color: var(--fuchsia-color-dark); } } .fuchsia-background { background: var(--fuchsia-background-color); } @media (prefers-color-scheme: dark) { .fuchsia-background { background: var(--fuchsia-background-color-dark); } } .gray { color: var(--gray-color); } @media (prefers-color-scheme: dark) { .gray { color: var(--gray-color-dark); } } .gray-background { background: var(--gray-background-color); } @media (prefers-color-scheme: dark) { .gray-background { background: var(--gray-background-color-dark); } } .green { color: var(--color-green); } @media (prefers-color-scheme: dark) { .green { color: var(--green-color-dark); } } .green-background { background: var(--green-background-color); } @media (prefers-color-scheme: dark) { .green-background { background: var(--green-background-color-dark); } } .lime { color: var(--lime-color); } @media (prefers-color-scheme: dark) { .lime { color: var(--lime-color-dark); } } .lime-background { background: var(--lime-background-color); } @media (prefers-color-scheme: dark) { .lime-background { background: var(--lime-background-color-dark); } } .maroon { color: var(--maroon-color); } @media (prefers-color-scheme: dark) { .maroon { color: var(--maroon-color-dark); } } .maroon-background { background: var(--maroon-background-color); } @media (prefers-color-scheme: dark) { .maroon-background { background: var(--maroon-background-color-dark); } } .navy { color: var(--navy-color); } @media (prefers-color-scheme: dark) { .navy { color: var(--navy-color-dark); } } .navy-background { background: var(--navy-background-color); } @media (prefers-color-scheme: dark) { .navy-background { background: var(--navy-background-color-dark); } } .olive { color: var(--olive-color); } @media (prefers-color-scheme: dark) { .olive { color: var(--olive-color-dark); } } .olive-background { background: var(--olive-background-color); } @media (prefers-color-scheme: dark) { .olive-background { background: var(--olive-background-color-dark); } } .orange { color: var(--orange-color); } @media (prefers-color-scheme: dark) { .orange { color: var(--orange-color-dark); } } .orange-background { background: var(--orange-background-color); } @media (prefers-color-scheme: dark) { .orange-background { background: var(--orange-background-color-dark); } } .purple { color: var(--purple-color); } @media (prefers-color-scheme: dark) { .purple { color: var(--purple-color-dark); } } .purple-background { background: var(--purple-background-color); } @media (prefers-color-scheme: dark) { .purple-background { background: var(--purple-background-color-dark); } } .red { color: var(--red-color); } @media (prefers-color-scheme: dark) { .red { color: var(--red-color-dark); } } .red-background { background: var(--red-background-color); } @media (prefers-color-scheme: dark) { .red-background { background: var(--red-background-color-dark); } } .silver { color: var(--silver-color); } @media (prefers-color-scheme: dark) { .silver { color: var(--silver-color-dark); } } .silver-background { background: var(--silver-background-color); } @media (prefers-color-scheme: dark) { .silver-background { background: var(--silver-background-color-dark); } } .teal { color: var(--teal-color); } @media (prefers-color-scheme: dark) { .teal { color: var(--teal-color-dark); } } .teal-background { background: var(--teal-background-color); } @media (prefers-color-scheme: dark) { .teal-background { background: var(--teal-background-color-dark); } } .white { color: var(--white-color); } @media (prefers-color-scheme: dark) { .white { color: var(--white-color-dark); } } .white-background { background: var(--white-background-color); } @media (prefers-color-scheme: dark) { .white-background { background: var(--white-background-color-dark); } } .yellow { color: var(--yellow-color); } @media (prefers-color-scheme: dark) { .yellow { color: var(--yellow-color-dark); } } .yellow-background { background: var(--yellow-background-color); } @media (prefers-color-scheme: dark) { .yellow-background { background: var(--yellow-background-color-dark); } } span.icon > .fa { cursor: default; } a span.icon > .fa { cursor: inherit; } /******************************************************************* The Admonitions as Standard Text or only Icons ********************************************************************/ .admonitionblock td.icon [class^=""fa icon-""] { font-size: 2.5em; /* The size of the icon if displayed */ cursor: default; } .admonitionblock td.icon .icon-note::before { content: ""\f05a""; /* The font icon for NOTE */ color: var(--note-color); } .admonitionblock td.icon .icon-tip::before { content: ""\f0eb""; /* The font icon for TIP */ color: var(--tip-color); } .admonitionblock td.icon .icon-warning::before { content: ""\f071""; /* The font icon for WARNING */ color: var(--warning-color); } .admonitionblock td.icon .icon-caution::before { content: ""\f06d""; /* The font icon for CAUTION */ color: var(--caution-color); } .admonitionblock td.icon .icon-important::before { content: ""\f06a""; /* The font icon for IMPRTDANT */ color: var(--important-color); } /*********************************************************************************** To control the style of callout numbers inside verbatim blocks and in callout lists. ************************************************************************************/ .conum[data-value] { display: inline-block; color: #fff !important; background: var(--footer-background-color); border-radius: 50%; text-align: center; font-size: 0.75em; width: 1.67em; height: 1.67em; line-height: 1.67em; font-family: var(--body-font); font-style: normal; font-weight: bold; } @media (prefers-color-scheme: dark) { .conum[data-value] { background: var(--footer-background-color-dark); } } .conum[data-value] * { color: #fff !important; } .conum[data-value] + b { display: none; } .conum[data-value]::after { content: attr(data-value); } pre .conum[data-value] { position: relative; top: -0.125em; } b.conum * { color: inherit !important; } .conum:not([data-value]):empty { display: none; } dt, th.tableblock, td.content, div.footnote { text-rendering: optimizeLegibility; } h1, h2, p, td.content, span.alt, summary { letter-spacing: -0.01em; } p strong, td.content strong, div.footnote strong { letter-spacing: -0.005em; } p, blockquote, dt, td.content, span.alt, summary { font-size: 1.0625rem; } .sidebarblock p, .sidebarblock dt, .sidebarblock td.content, p.tableblock { font-size: 1em; } .hyphens-none { hyphens: none; -webkit-hyphens: none; } .hyphens-auto { hyphens: auto; -webkit-hyphens: auto; } .hyphens-manual { hyphens: manual; -webkit-hyphens: manual; } /*********************************************************************************** Printing ************************************************************************************/ /*** These rules apply for printing HTML AND PDF pagination inside adoc Studio ***/ @media print { html { font-size: 80%; } abbr[title] { border-bottom: 1px dotted; } abbr[title]::after { content: "" ("" attr(title) "")""; } pre, blockquote, tr, img, object, svg { page-break-inside: avoid; } p, blockquote, dt, td.content { font-size: 1em; /* Resets the whole text to default based on their parents */ orphans: 3; widows: 3; } h2, h3, #toctitle, .sidebarblock > .content > .title { page-break-after: avoid; } body > div[id] { max-width: none; } } /*** These rules only apply for paginating PDFs inside adoc Studio ***/ @media vivliostyle { /* Prevent an empty header from opening new pages */ #header:empty { display:none; } @page { size: var(--ads-page-size, A4 portrait); /* --ads-page-size transfers the set dimensions */ margin: var(--ads-page-margin, 2.5cm); /* to the print dialog of adoc Studio.*/ } @page :first { @top-center { content: ""; } @top-right { content: ""; } @bottom-center { content: ""; } } /* The main pages are the ones which show a counter according to the pagenums attribute */ @page main { counter-increment: main-page; } @page main:left { @bottom-left { content: counter(main-page); } } @page main:right { @bottom-right { content: counter(main-page); } } @page :left { @top-right { content: string(doctitle); } @bottom-right { content: string(heading, first); } } @page :right { @top-right { content: string(doctitle); } @bottom-left { content: string(heading, first); } } h1 { string-set: doctitle content(text); } body[data-pagenums=""title""] { page: main; } body[data-pagenums=""toc""] .toc, body[data-pagenums=""toc""] #content * { page: main; } body[data-pagenums=""body""] #content * { page: main; } body.title-page .toc, body.title-page h1.sect0, body.title-page .sect1 > h2, body.title-page #content { break-before: page; } #toc a::after { content: leader('.') target-counter(attr(href), main-page); } #header { font-size: 1.4em; text-align: left; left: -0.5em; padding-bottom: 1.2em; } body.title-page #header { margin-top: 15pvh; } #header > h1:first-child { color: var(--headline-color); font-size: 1.4em; margin-bottom: 0.6em; } #header .details { color: var(--color); display: inline; } #header #revnumber { text-transform: unset !important; } #header #revnumber::before { display: block; content: ""\A""; } body[data-media=""print""] #toc, body[data-media=""print""] .sidebarblock, body[data-media=""print""] .exampleblock > .content, body[data-media=""prepress""] #toc, body[data-media=""prepress""] .sidebarblock, body[data-media=""prepress""] .exampleblock > .content { background: none !important; } body[data-media=""print""] a[href^=""http:""]:not(.bare)::after, body[data-media=""print""] a[href^=""https:""]:not(.bare)::after, body[data-media=""prepress""] a[href^=""http:""]:not(.bare)::after, body[data-media=""prepress""] a[href^=""https:""]:not(.bare)::after { content: ""\00a0("" attr(href) "")""; display: inline-block; font-size: 0.8em; color: var(--color); } #toc { font-size: 80%; margin-top: 5pvh; } /* Do I really have to re-set all background colors for the Vivliostyle media type? */ /* Here a few examples */ table thead, table tfoot { background: var(--table-head-background-color); } table.stripes-all > * > tr, table.stripes-odd > * > tr:nth-of-type(odd), table.stripes-even > * > tr:nth-of-type(even), table.stripes-hover > * > tr:hover { background: var(--table-stripes-background-color); } :not(pre):not([class^=L]) > code { background: var(--pre-background-color); } } /*** These rules are only for printing HTML documents and are NOT applied for PDF pagination ***/ @media print { @media not vivliostyle { * { box-shadow: none !important; text-shadow: none !important; } a { color: inherit !important; text-decoration: underline !important; } a.bare, a[href^=""#""], a[href^=""mailto:""] { text-decoration: none !important; } a[href^=""http:""]:not(.bare)::after, a[href^=""https:""]:not(.bare)::after { content: ""\00a0("" attr(href) "")""; /* Add a space between Text and Link */ display: inline-block; font-size: 0.875em; padding-left: 0.25em; color: var(--color); } thead { display: table-header-group; } #toc { border-bottom: 1px solid var(--single-border-color) !important; padding-bottom: 0 !important; } #toc, .sidebarblock, .exampleblock > .content { background: none !important; } body.book #header { text-align: center; } body.book #header > h1:first-child { border: 0 !important; margin: 2.5em 0 1em; } body.book #header .details { border: 0 !important; display: block; padding: 0 !important; } body.book #header .details span:first-child { margin-left: 0 !important; } body.book #header .details br { display: block; } body.book #header .details br + span::before { content: none !important; } body.book #toc { border: 0 !important; text-align: left !important; padding: 0 !important; margin: 0 !important; } .listingblock code[data-lang]::before { display: block; } div.page-break { display: block; page-break-after: always; } #footer { padding: 0 0.9375em; } .hide-on-print { display: none !important; } .print-only { display: block !important; } .hide-for-print { display: none !important; } .show-for-print { display: inherit !important; } #header > h1:first-child { margin-top: 1.25rem; } .sect1 { padding: 0 !important; } .sect1 + .sect1 { border: 0; } #footer { background: none; } #footer-text { color: var(--color-dark); font-size: 0.9em; } } } /*** Special Styles for Amazon Devices ***/ @media amzn-kf8 { #header > h1:first-child { margin-top: 1.25rem; } .sect1 { padding: 0 !important; } .sect1 + .sect1 { border: 0; } #footer { background: none; } #footer-text { color: var(--color-dark); font-size: 0.9em; } body > div[id] { padding: 0; } } "; RegexOptions options = RegexOptions.Multiline | RegexOptions.IgnoreCase; foreach (Match m in Regex.Matches(input, pattern, options)) { Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index); } } }

Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx