Skip to content

Commit 266b6b7

Browse files
authored
Merge pull request #61 from CoderDojoPotsdam/niccokunzmann-patch-1
fix #56
2 parents 7335b5e + e7646a8 commit 266b6b7

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

steps/07-05-start-and-end.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
layout: step
3+
title: Start and End
4+
lang: en
5+
---
6+
<p>
7+
You can find lines in which the <span class="regex">a</span> appears only twice or four times.
8+
</p>
9+
<div class="playfield">
10+
<input type="text" value="" class="regex" reference="^aa$|^aaaa$">
11+
<div class="message"></div>
12+
<ul class="examples">
13+
<li>a</li>
14+
<li>aa</li>
15+
<li>aaa</li>
16+
<li>aaaa</li>
17+
<li>aaaaa</li>
18+
</ul>
19+
</div>
20+
<p class="hint">
21+
<span class="regex">^aa|aaaa$</span> does not work, because <span class="regex">^aa</span> matches <span class="regex">aaa</span>.
22+
<span class="regex">aaa</span> also starts with <span class="regex">aa</span>.
23+
This is why both <span class="regex">^</span> and <span class="regex">$</span> must be used twice in the expression.
24+
</p>
25+

0 commit comments

Comments
 (0)