Regular Expressions 101

Save & Share

  • Regex Version: ver. 4
  • 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

/
/
gU

Test String

Substitution

Processing...

Code Generator

Generated Code

import Foundation // WARNING: You included a flag that Swift doesn't support: U // When this flag is set, it inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by '?'. // As an alternative, this effect can also be achieved by setting a (?U) modifier setting within the pattern or by a question mark behind a quantifier (e.g. .*?). let pattern = #"(src|href)="\/download\/(.*)\/(.*)\/(.*)"# let regex = try! NSRegularExpression(pattern: pattern) let testString = ##""" <div class="contentLayout2"> <div class="columnLayout single" data-layout="single"> <div class="cell normal" data-type="normal"> <div class="innerCell"> <div class="confluence-information-macro confluence-information-macro-tip conf-macro output-block" data-hasbody="true" data-macro-name="tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"> </span><div class="confluence-information-macro-body"><p>Welcome to your first space. Go ahead, edit and customize this home page any way you like. We've added some sample content to get you started.</p></div></div></div> </div> </div> <div class="columnLayout single" data-layout="single"> <div class="cell normal" data-type="normal"> <div class="innerCell"> <p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="/download/attachments/65591/peak.jpeg?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-image-src="/download/attachments/65591/peak.jpeg?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-unresolved-comment-count="1" data-linked-resource-id="65596" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="peak.jpeg" data-base-url="http://localhost:8090" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="65591" data-linked-resource-container-version="1"></span></p><p> </p></div> </div> </div> <div class="columnLayout two-right-sidebar" data-layout="two-right-sidebar"> <div class="cell normal" data-type="normal"> <div class="innerCell"> <hr/><h1 id="dupa-Goal"><strong>Goal</strong></h1><h2 id="dupa-Yourspacehomepageshouldsummarizewhatthespaceisfor,andprovidelinkstokeyresourcesforyourteam."><em>Your space homepage should summarize what the space is for, and provide links to key resources for your team. </em></h2><hr/><p> </p><h1 id="dupa-Coreteam"><strong>Core team</strong></h1><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td class="confluenceTd"><p style="text-align: center;"><span class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img class="confluence-embedded-image confluence-thumbnail" width="100" src="/download/thumbnails/65591/Harvey.jpg?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-image-src="/download/attachments/65591/Harvey.jpg?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="65597" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="Harvey.jpg" data-base-url="http://localhost:8090" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="65591" data-linked-resource-container-version="1"></span></p><p style="text-align: center;"><strong>Harvey Honner-white<br/></strong>Team Lead<strong> </strong></p></td><td class="confluenceTd"><p style="text-align: center;"><span class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img class="confluence-embedded-image confluence-thumbnail" width="100" src="/download/thumbnails/65591/Alana.jpg?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-image-src="/download/attachments/65591/Alana.jpg?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="65595" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="Alana.jpg" data-base-url="http://localhost:8090" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="65591" data-linked-resource-container-version="1"></span></p><p style="text-align: center;"><strong>Alana Baczewski<br/> </strong>Tech Lead</p></td><td class="confluenceTd"><p style="text-align: center;"><span class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img class="confluence-embedded-image confluence-thumbnail" width="100" src="/download/thumbnails/65591/Sameer.jpg?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-image-src="/download/attachments/65591/Sameer.jpg?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="65594" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="Sameer.jpg" data-base-url="http://localhost:8090" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="65591" data-linked-resource-container-version="1"></span></p><p style="text-align: center;"><strong>Sameer Farrell<br/> </strong>Marketing</p></td><td class="confluenceTd"><p style="text-align: center;"><span class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img class="confluence-embedded-image confluence-thumbnail" width="100" src="/download/thumbnails/65591/Cassie.jpg?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-image-src="/download/attachments/65591/Cassie.jpg?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="65598" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="Cassie.jpg" data-base-url="http://localhost:8090" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="65591" data-linked-resource-container-version="1"></span></p><p style="text-align: center;"><strong>Mia Bednarczyk<br/> </strong>Recruitment</p></td></tr></tbody></table></div><p> </p><h1 id="dupa-Roadmap"><strong>Roadmap</strong></h1><p>You can edit this roadmap or create a new one by adding the Roadmap Planner macro from the Insert menu. Link your Confluence pages to each bar to add visibility, and find more tips by reading the Atlassian blog: <a href="http://blogs.atlassian.com/2015/01/roadmap-planner-macro/" class="external-link" rel="nofollow">Plan better in 2015 with the Roadmap Planner macro</a>.</p><p><div class="conf-macro output-block" data-hasbody="false" data-macro-name="roadmap"><!--style should be put here to apply css for svg immediately --> <style> .roadmap-macro-view { position: relative; font-size: 14px; } .roadmap-macro-view svg { overflow: hidden; } .roadmap-macro-view .svg-overlay { position: absolute; top: 0; bottom: 0; left: 0; right: 0; pointer-events: none; overflow: hidden; } .roadmap-macro-view .svg-bar-overlay { position: absolute; width: 100%; height: 100%; clip: rect(auto, auto, auto, 51px); } .roadmap-macro-view .overlay-element { pointer-events: auto; position: absolute; box-sizing: border-box; } .roadmap-macro-view .ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; } .roadmap-macro-view .lane-title{ line-height: 36px; padding: 0 12px; } .roadmap-macro-view .bar-title { line-height: 38px; padding: 0 8px; cursor: pointer; background-color: rgba(0, 0, 0, 0); /*tips to make whole div clickable in IE(>=8) */ } .roadmap-macro-view .rotate-text { transform: translate(0, 100%) rotate(270deg); transform-origin: 0 0 0; -webkit-transform: translate(0, 100%) rotate(270deg); -webkit-transform-origin: 0% 0%; -ms-transform: translate(0, 100%) rotate(270deg); -ms-transform-origin: 0% 0%; } </style> <div class="roadmap-macro-view" data-roadmap-macro-view="{&quot;id&quot;:65591, &quot;version&quot;:1, &quot;hash&quot;:&quot;f0477dfac6f6ca380d8c5f2f44041947&quot;, &quot;canUserEditPage&quot;:true}"> <svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" data-roadmap-id="45778897-d002-421b-82f0-ab78fd3f630d" stroke-linecap="square" width="807" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" height="499" xmlns="http://www.w3.org/2000/svg" font-family="'Dialog'" font-style="normal" stroke-linejoin="miter" font-size="12px" stroke-dashoffset="0" image-rendering="auto"><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"/><g><g fill="white" stroke="white"><rect x="0" width="807" height="499" y="0" stroke="none"/></g><g stroke-linecap="round" font-size="13px" fill="rgb(112,112,112)" text-rendering="geometricPrecision" font-family="sans-serif" stroke-linejoin="round" stroke-dasharray="3.5,6.5" stroke="rgb(112,112,112)" stroke-width="0.3" stroke-miterlimit="1"><line y2="408" fill="none" x1="57" x2="57" y1="70"/><text x="96" xml:space="preserve" y="50" stroke="none">Jun</text><text x="90" xml:space="preserve" y="35" roadmap-column-text="true" font-weight="bold" stroke="none">2015</text><line y2="408" fill="none" x1="157" x2="157" y1="70"/><text x="199" xml:space="preserve" y="50" roadmap-column-text="true" stroke="none">Jul</text><line y2="408" fill="none" x1="257" x2="257" y1="70"/><text x="294" xml:space="preserve" y="50" roadmap-column-text="true" stroke="none">Aug</text><line y2="408" fill="none" x1="357" x2="357" y1="70"/><text x="394" xml:space="preserve" y="50" roadmap-column-text="true" stroke="none">Sep</text><line y2="408" fill="none" x1="457" x2="457" y1="70"/><text x="495" xml:space="preserve" y="50" roadmap-column-text="true" stroke="none">Oct</text><line y2="408" fill="none" x1="557" x2="557" y1="70"/><text x="594" xml:space="preserve" y="50" roadmap-column-text="true" stroke="none">Nov</text><line y2="408" fill="none" x1="657" x2="657" y1="70"/><text x="694" xml:space="preserve" y="50" roadmap-column-text="true" stroke="none">Dec</text></g><g fill="rgb(208,68,55)" text-rendering="geometricPrecision" stroke-width="1.5" font-size="14px" font-family="sans-serif" stroke="rgb(208,68,55)"><line data-roadmap-marker="{title:Yearly Finalisation,markerDate:Nov 29, 2015 12:21:23 PM}" y2="418" fill="none" x1="652" x2="652" y1="70"/><text x="631" xml:space="preserve" y="436" stroke="none">Yearly </text><text x="613" xml:space="preserve" y="453" stroke="none">Finalisation</text></g><g fill="rgb(245,133,152)" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="rgb(245,133,152)"><rect x="253" y="78" width="362" rx="2" ry="2" height="37" stroke="none"/><rect x="253" data-roadmap-bar="{id:e703c6a8-1649-4d20-9ccf-2c7a8698e385,title:Social campaign,description:Add a description to your bars here.,startDate:Jul 30, 2015 11:10:05 AM,duration:3.6435643564356437,rowIndex:0,pageLink:{}}" y="78" fill="none" width="362" rx="2" ry="2" height="37" stroke="rgb(241,92,117)"/></g><g fill="rgb(245,133,152)" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="rgb(245,133,152)"><rect x="210" y="123" width="329" rx="2" ry="2" height="37" stroke="none"/><rect x="210" data-roadmap-bar="{id:655d454d-b701-4584-a301-9ea0bb86ed32,title:Website development,description:Add a description to your bars here.,startDate:Jul 17, 2015 6:24:57 AM,duration:3.3069306930693068,rowIndex:1,pageLink:{}}" y="123" fill="none" width="329" rx="2" ry="2" height="37" stroke="rgb(241,92,117)"/></g><g fill="rgb(245,133,152)" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="rgb(245,133,152)"><rect x="58" y="168" width="253" rx="2" ry="2" height="37" stroke="none"/><rect x="58" data-roadmap-bar="{id:c420ef33-ae28-4828-958f-8a9d793153b3,title:Crowdfunding campaign,description:Add a description to your bars here.,startDate:Jun 1, 2015 12:00:00 AM,duration:2.5544554455445545,rowIndex:2,pageLink:{}}" y="168" fill="none" width="253" rx="2" ry="2" height="37" stroke="rgb(241,92,117)"/></g><g fill="rgb(140,119,161)" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="rgb(140,119,161)"><rect x="58" y="221" width="248" rx="2" ry="2" height="37" stroke="none"/><rect x="58" data-roadmap-bar="{id:1230bab8-718c-47da-903a-2cbdcb220d97,title:Recruitment,description:,startDate:Jun 1, 2015 12:00:00 AM,duration:2.5,rowIndex:0,pageLink:{}}" y="221" fill="none" width="248" rx="2" ry="2" height="37" stroke="rgb(101,73,130)"/></g><g fill="rgb(140,119,161)" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="rgb(140,119,161)"><rect x="311" y="221" width="289" rx="2" ry="2" height="37" stroke="none"/><rect x="311" data-roadmap-bar="{id:8639d09c-59d1-4d1f-ad91-c78f04b20135,title:Assessment Period,description:,startDate:Aug 17, 2015 1:46:55 PM,duration:2.910891089108911,rowIndex:0,pageLink:{}}" y="221" fill="none" width="289" rx="2" ry="2" height="37" stroke="rgb(101,73,130)"/></g><g fill="rgb(140,119,161)" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="rgb(140,119,161)"><rect x="360" y="266" width="257" rx="2" ry="2" height="37" stroke="none"/><rect x="360" data-roadmap-bar="{id:802b53f7-ba66-4415-984d-efef93b4caec,title:Training,description:,startDate:Sep 1, 2015 9:23:10 PM,duration:2.5841584158415842,rowIndex:1,pageLink:{}}" y="266" fill="none" width="257" rx="2" ry="2" height="37" stroke="rgb(101,73,130)"/></g><g fill="rgb(140,119,161)" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="rgb(140,119,161)"><rect x="605" y="221" width="142" rx="2" ry="2" height="37" stroke="none"/><rect x="605" data-roadmap-bar="{id:502fac56-3849-415f-b412-af27c39229b7,title:Finalisation,description:,startDate:Nov 15, 2015 6:10:41 AM,duration:1.4356435643564356,rowIndex:0,pageLink:{}}" y="221" fill="none" width="142" rx="2" ry="2" height="37" stroke="rgb(101,73,130)"/></g><g fill="rgb(108,159,211)" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="rgb(108,159,211)"><rect x="135" y="319" width="216" rx="2" ry="2" height="37" stroke="none"/><rect x="135" data-roadmap-bar="{id:00ada54b-0998-41a5-aa98-712ecdec8c7f,title:Planning,description:,startDate:Jun 24, 2015 4:02:22 AM,duration:2.1782178217821784,rowIndex:0,pageLink:{}}" y="319" fill="none" width="216" rx="2" ry="2" height="37" stroke="rgb(59,127,196)"/></g><g fill="rgb(108,159,211)" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="rgb(108,159,211)"><rect x="355" y="319" width="190" rx="2" ry="2" height="37" stroke="none"/><rect x="355" data-roadmap-bar="{id:71967f2c-f3ab-4871-aaf5-7cf31389e62f,title:Development,description:,startDate:Aug 31, 2015 1:54:03 AM,duration:1.9207920792079207,rowIndex:0,pageLink:{}}" y="319" fill="none" width="190" rx="2" ry="2" height="37" stroke="rgb(59,127,196)"/></g><g fill="rgb(108,159,211)" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="rgb(108,159,211)"><rect x="550" y="319" width="98" rx="2" ry="2" height="37" stroke="none"/><rect x="550" data-roadmap-bar="{id:d76ac773-3ee7-495b-9d7f-1daf267dc58c,title:Testing,description:,startDate:Oct 29, 2015 1:04:09 PM,duration:1.0,rowIndex:0,pageLink:{}}" y="319" fill="none" width="98" rx="2" ry="2" height="37" stroke="rgb(59,127,196)"/></g><g fill="rgb(108,159,211)" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="rgb(108,159,211)"><rect x="655" y="319" width="100" rx="2" ry="2" height="37" stroke="none"/><rect x="655" data-roadmap-bar="{id:4f584dc6-63b8-4efa-a98e-a5d7bbe9910e,title:Deploy,description:,startDate:Nov 30, 2015 2:36:49 AM,duration:1.0297029702970297,rowIndex:0,pageLink:{}}" y="319" fill="none" width="100" rx="2" ry="2" height="37" stroke="rgb(59,127,196)"/></g><g fill="white" text-rendering="geometricPrecision" font-weight="bold" font-family="sans-serif" stroke="white"><rect x="0" width="57" height="419" y="0" stroke="none"/><rect x="757" width="50" height="419" y="0" stroke="none"/><rect x="10" y="70" fill="rgb(241,92,117)" width="37" rx="0" ry="0" height="143" stroke="none"/><rect x="10" y="70" fill="none" width="37" rx="0" ry="0" height="143" stroke="rgb(209,209,209)"/></g><g fill="rgb(101,73,130)" text-rendering="geometricPrecision" font-size="13px" font-weight="bold" font-family="sans-serif" stroke="rgb(101,73,130)"><rect x="10" y="213" width="37" rx="0" ry="0" height="98" stroke="none"/><rect x="10" y="213" fill="none" width="37" rx="0" ry="0" height="98" stroke="rgb(209,209,209)"/></g><g fill="rgb(59,127,196)" text-rendering="geometricPrecision" font-size="13px" font-weight="bold" font-family="sans-serif" stroke="rgb(59,127,196)"><rect x="10" y="311" width="37" rx="0" ry="0" height="97" stroke="none"/><rect x="10" y="311" fill="none" width="37" rx="0" ry="0" height="97" stroke="rgb(209,209,209)"/></g><g fill="rgb(209,209,209)" text-rendering="geometricPrecision" font-size="13px" font-weight="bold" font-family="sans-serif" stroke="rgb(209,209,209)"><line y2="70" fill="none" x1="20" x2="757" y1="70"/><line y2="213" fill="none" x1="20" x2="757" y1="213"/><line y2="311" fill="none" x1="20" x2="757" y1="311"/><line y2="408" fill="none" x1="20" x2="757" y1="408"/><line y2="408" fill="none" x1="757" x2="757" y1="70"/></g></g><div class="svg-overlay" style="width:757px"><div title="Marketing" style="left:10px; top:70px; width:143px; height:37px; color:#ffffff; margin-top:106px" class="overlay-element ellipsis rotate-text lane-title">Marketing</div><div title="People" style="left:10px; top:213px; width:98px; height:37px; color:#ffffff; margin-top:61px" class="overlay-element ellipsis rotate-text lane-title">People</div><div title="Product" style="left:10px; top:311px; width:97px; height:37px; color:#ffffff; margin-top:60px" class="overlay-element ellipsis rotate-text lane-title">Product</div><div class="svg-bar-overlay"><div title="Social campaign" style="left:253px; top:78px; width:362px; color:#ffffff" class="overlay-element ellipsis bar-title" data-roadmap-bar="{&quot;id&quot;:&quot;e703c6a8-1649-4d20-9ccf-2c7a8698e385&quot;,&quot;title&quot;:&quot;Social campaign&quot;,&quot;description&quot;:&quot;Add a description to your bars here.&quot;,&quot;startDate&quot;:&quot;Jul 30, 2015 11:10:05 AM&quot;,&quot;duration&quot;:3.6435643564356437,&quot;rowIndex&quot;:0,&quot;pageLink&quot;:{}}"><p class="ellipsis">Social campaign</p></div><div title="Website development" style="left:210px; top:123px; width:329px; color:#ffffff" class="overlay-element ellipsis bar-title" data-roadmap-bar="{&quot;id&quot;:&quot;655d454d-b701-4584-a301-9ea0bb86ed32&quot;,&quot;title&quot;:&quot;Website development&quot;,&quot;description&quot;:&quot;Add a description to your bars here.&quot;,&quot;startDate&quot;:&quot;Jul 17, 2015 6:24:57 AM&quot;,&quot;duration&quot;:3.3069306930693068,&quot;rowIndex&quot;:1,&quot;pageLink&quot;:{}}"><p class="ellipsis">Website development</p></div><div title="Crowdfunding campaign" style="left:58px; top:168px; width:253px; color:#ffffff" class="overlay-element ellipsis bar-title" data-roadmap-bar="{&quot;id&quot;:&quot;c420ef33-ae28-4828-958f-8a9d793153b3&quot;,&quot;title&quot;:&quot;Crowdfunding campaign&quot;,&quot;description&quot;:&quot;Add a description to your bars here.&quot;,&quot;startDate&quot;:&quot;Jun 1, 2015 12:00:00 AM&quot;,&quot;duration&quot;:2.5544554455445545,&quot;rowIndex&quot;:2,&quot;pageLink&quot;:{}}"><p class="ellipsis">Crowdfunding campaign</p></div><div title="Recruitment" style="left:58px; top:221px; width:248px; color:#ffffff" class="overlay-element ellipsis bar-title" data-roadmap-bar="{&quot;id&quot;:&quot;1230bab8-718c-47da-903a-2cbdcb220d97&quot;,&quot;title&quot;:&quot;Recruitment&quot;,&quot;description&quot;:&quot;&quot;,&quot;startDate&quot;:&quot;Jun 1, 2015 12:00:00 AM&quot;,&quot;duration&quot;:2.5,&quot;rowIndex&quot;:0,&quot;pageLink&quot;:{}}"><p class="ellipsis">Recruitment</p></div><div title="Assessment Period" style="left:311px; top:221px; width:289px; color:#ffffff" class="overlay-element ellipsis bar-title" data-roadmap-bar="{&quot;id&quot;:&quot;8639d09c-59d1-4d1f-ad91-c78f04b20135&quot;,&quot;title&quot;:&quot;Assessment Period&quot;,&quot;description&quot;:&quot;&quot;,&quot;startDate&quot;:&quot;Aug 17, 2015 1:46:55 PM&quot;,&quot;duration&quot;:2.910891089108911,&quot;rowIndex&quot;:0,&quot;pageLink&quot;:{}}"><p class="ellipsis">Assessment Period</p></div><div title="Training" style="left:360px; top:266px; width:257px; color:#ffffff" class="overlay-element ellipsis bar-title" data-roadmap-bar="{&quot;id&quot;:&quot;802b53f7-ba66-4415-984d-efef93b4caec&quot;,&quot;title&quot;:&quot;Training&quot;,&quot;description&quot;:&quot;&quot;,&quot;startDate&quot;:&quot;Sep 1, 2015 9:23:10 PM&quot;,&quot;duration&quot;:2.5841584158415842,&quot;rowIndex&quot;:1,&quot;pageLink&quot;:{}}"><p class="ellipsis">Training</p></div><div title="Finalisation" style="left:605px; top:221px; width:142px; color:#ffffff" class="overlay-element ellipsis bar-title" data-roadmap-bar="{&quot;id&quot;:&quot;502fac56-3849-415f-b412-af27c39229b7&quot;,&quot;title&quot;:&quot;Finalisation&quot;,&quot;description&quot;:&quot;&quot;,&quot;startDate&quot;:&quot;Nov 15, 2015 6:10:41 AM&quot;,&quot;duration&quot;:1.4356435643564356,&quot;rowIndex&quot;:0,&quot;pageLink&quot;:{}}"><p class="ellipsis">Finalisation</p></div><div title="Planning" style="left:135px; top:319px; width:216px; color:#ffffff" class="overlay-element ellipsis bar-title" data-roadmap-bar="{&quot;id&quot;:&quot;00ada54b-0998-41a5-aa98-712ecdec8c7f&quot;,&quot;title&quot;:&quot;Planning&quot;,&quot;description&quot;:&quot;&quot;,&quot;startDate&quot;:&quot;Jun 24, 2015 4:02:22 AM&quot;,&quot;duration&quot;:2.1782178217821784,&quot;rowIndex&quot;:0,&quot;pageLink&quot;:{}}"><p class="ellipsis">Planning</p></div><div title="Development" style="left:355px; top:319px; width:190px; color:#ffffff" class="overlay-element ellipsis bar-title" data-roadmap-bar="{&quot;id&quot;:&quot;71967f2c-f3ab-4871-aaf5-7cf31389e62f&quot;,&quot;title&quot;:&quot;Development&quot;,&quot;description&quot;:&quot;&quot;,&quot;startDate&quot;:&quot;Aug 31, 2015 1:54:03 AM&quot;,&quot;duration&quot;:1.9207920792079207,&quot;rowIndex&quot;:0,&quot;pageLink&quot;:{}}"><p class="ellipsis">Development</p></div><div title="Testing" style="left:550px; top:319px; width:98px; color:#ffffff" class="overlay-element ellipsis bar-title" data-roadmap-bar="{&quot;id&quot;:&quot;d76ac773-3ee7-495b-9d7f-1daf267dc58c&quot;,&quot;title&quot;:&quot;Testing&quot;,&quot;description&quot;:&quot;&quot;,&quot;startDate&quot;:&quot;Oct 29, 2015 1:04:09 PM&quot;,&quot;duration&quot;:1.0,&quot;rowIndex&quot;:0,&quot;pageLink&quot;:{}}"><p class="ellipsis">Testing</p></div><div title="Deploy" style="left:655px; top:319px; width:100px; color:#ffffff" class="overlay-element ellipsis bar-title" data-roadmap-bar="{&quot;id&quot;:&quot;4f584dc6-63b8-4efa-a98e-a5d7bbe9910e&quot;,&quot;title&quot;:&quot;Deploy&quot;,&quot;description&quot;:&quot;&quot;,&quot;startDate&quot;:&quot;Nov 30, 2015 2:36:49 AM&quot;,&quot;duration&quot;:1.0297029702970297,&quot;rowIndex&quot;:0,&quot;pageLink&quot;:{}}"><p class="ellipsis">Deploy</p></div></div></div></svg> </div> </div></p><p> </p><h1 id="dupa-Knowyourspaces"><strong>Know your spaces</strong> </h1><p>Everything your team is working on - meeting notes and agendas, project plans and timelines, technical documentation and more - is located in a space; it's home base for your team.</p><p>A small team should plan to have a space for the team, and a space for each big project. If you'll be working in Confluence with several other teams and departments, we recommend a space for each team as well as a space for each major cross-team project. The key is to think of a space as the container that holds all the important stuff - like pages, files, and blog posts - a team, group, or project needs to work.</p><h1 id="dupa-Knowyourpages"><strong>Know your pages</strong></h1><p>If you're working on something related to your team - project plans, product requirements, blog posts, internal communications, you name it - create and store it in a Confluence page. Confluence pages offer a lot of flexibility in creating and storing information, and there are a number of useful page templates included to get you started, like the meeting notes template. Your spaces should be filled with pages that document your business processes, outline your plans, contain your files, and report on your progress. The more you learn to do in Confluence (adding tables and graphs, or embedding video and links are great places to start), the more engaging and helpful your pages will become.</p><p>Learn more by reading <a href="https://www.atlassian.com/collaboration/confluence-organize-work-in-spaces" class="external-link" rel="nofollow">Confluence 101: organize your work in spaces</a></p><p> </p><hr/></div> </div> <div class="cell aside" data-type="aside"> <div class="innerCell"> <h1 id="dupa-Quicknavigation"><strong>Quick navigation</strong></h1><p>When you create new pages in this space, they'll appear here automatically.</p><p><ul class="childpages-macro conf-macro output-block" data-hasbody="false" data-macro-name="children"><li><a href="/pages/viewpage.action?pageId=65601">No nie wierzę</a></li></ul></p><h1 id="dupa-Usefullinks"><strong>Useful links</strong></h1><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Link</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd"><a href="https://www.atlassian.com/collaboration/confluence-organize-work-in-spaces" class="external-link" rel="nofollow">Confluence 101: organize your work in spaces</a></td><td class="confluenceTd"><p>Chances are, the information you need to do your job lives in multiple places. Word docs, Evernote files, email, PDFs, even Post-it notes. It's scattered among different systems. And to make matters worse, <em>the stuff your teammates need is equally siloed</em>. If information had feelings, it would be lonely.</p><p>But with Confluence, you can bring all that information into one place.</p></td></tr><tr><td class="confluenceTd"><a href="https://www.atlassian.com/collaboration/confluence-discuss-work-with-your-team" class="external-link" rel="nofollow">Confluence 101: discuss work with your team</a></td><td class="confluenceTd">Getting a project outlined and adding the right content are just the first steps. Now it's time for your team to weigh in. Confluence makes it easy to discuss your work - with your team, your boss, or your entire company - in the same place where you organized and created it.</td></tr><tr><td colspan="1" class="confluenceTd"><a href="https://www.atlassian.com/collaboration/confluence-create-content-with-pages" class="external-link" rel="nofollow">Confluence 101: create content with pages</a></td><td colspan="1" class="confluenceTd">Think of pages as a New Age &quot;document.&quot; If Word docs were rotary phones, Confluence pages would be smart phones. A smart phone still makes calls (like their rotary counterparts), but it can do so much more than that</td></tr></tbody></table></div><p><strong style="font-size: 24.0px;line-height: 1.25;"><br/></strong></p><p><strong style="font-size: 24.0px;line-height: 1.25;">Tasks</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td class="confluenceTd"><ul class="inline-task-list" data-inline-tasks-content-id="65591"><li data-inline-task-id="59"><a href="https://confluence.atlassian.com/x/NgszKw" class="external-link" rel="nofollow">Customize the name, colour, and icon of Confluence</a>.</li><li data-inline-task-id="56">Decide who can see and edit this space or a specific page by clicking the <span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="/download/attachments/65591/lock-icon.png?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-image-src="/download/attachments/65591/lock-icon.png?version=1&amp;modificationDate=1589449401304&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="65593" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="lock-icon.png" data-base-url="http://localhost:8090" data-linked-resource-content-type="image/png" data-linked-resource-container-id="65591" data-linked-resource-container-version="1"></span> icon. Learn more about <a href="https://confluence.atlassian.com/x/liAC" class="external-link" rel="nofollow">Page Restrictions</a> and <a href="https://confluence.atlassian.com/x/ASEC" class="external-link" rel="nofollow">Space Permissions</a>.</li><li data-inline-task-id="57">Try adding an <a href="https://confluence.atlassian.com/x/2yAC" class="external-link" rel="nofollow">inline comment</a> by highlighting some text and click the comment icon.</li><li data-inline-task-id="58">Learn more about <a href="https://confluence.atlassian.com/x/SRwC" class="external-link" rel="nofollow">inviting your team to Confluence</a>.</li></ul> </td></tr></tbody></table></div></div> </div> </div> </div> """## let stringRange = NSRange(location: 0, length: testString.utf16.count) let substitutionString = #"$1="/myapp/documents/instance/$2/$3/$4"# let result = regex.stringByReplacingMatches(in: testString, range: stringRange, withTemplate: substitutionString) print(result)

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 Swift 5.2, please visit: https://developer.apple.com/documentation/foundation/nsregularexpression