Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions extern/xkcd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This image has been copied from xkcd.com

- https://imgs.xkcd.com/comics/regular_expressions.png
- https://www.xkcd.com/208/

License:
- https://creativecommons.org/licenses/by-nc/2.5/
- This file is licensed under Creative Commons Attribution-NonCommercial 2.5 Generic (CC BY-NC 2.5) License. https://creativecommons.org/licenses/by-nc/2.5/
Binary file added extern/xkcd/regular-expressions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion steps/00-01-introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
test if the input of a program is correct, and check if the users made mistakes.
</p>
<p>
<a target="_blank" href="https://www.xkcd.com/208/"><img src="https://imgs.xkcd.com/comics/regular_expressions.png"></a>
<a target="_blank" href="../extern/xkcd/README.md">
<img src="../extern/xkcd/regular-expressions.png">
</a>
</p>
<script type="text/javascript">
window.addEventListener("load", function(){
Expand Down
10 changes: 5 additions & 5 deletions steps/02-02-sequences-of-letters.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
---
<p>
You can find words by wrapping them in spaces.
Try to find the word "geben", not the word "umgeben" or "vergebens"
Try to find the word "day", not the word "someday" or "birthdays"
by using the word with spaces.
</p>
<div class="playfield">
<input type="text" value="" class="regex" reference=" geben">
<div class="message"></div>
<ul class="examples">
<li>Wir sind umgeben von</li>
<li>Leuten, die gerne was geben,</li>
<li>wenn es nicht vergebens ist.</li>
<li>We have to go shopping someday.</li>
<li>Another day, I don't have time right now.</li>
<li>All these birthdays are killing me!</li>
</ul>
</div>
</div>
28 changes: 14 additions & 14 deletions steps/03-01-or.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
Many programming languages use the character "|" as a replacement for "or".
</p>
<p>
In the following list, you can filter all villages
which contain <span class="regex">hausen</span> or <span class="regex">roda</span>
by writing <span class="regex">hausen|roda</span>.
I read <span class="regex">hausen|roda</span> like "hausen or roda".
In the following list, you can filter all cities
which contain <span class="regex">ham</span> or <span class="regex">New</span>
by writing <span class="regex">ham|New</span>.
I read <span class="regex">ham|New</span> like "ham or New".
To write the character <span class="regex">|</span>,
you can use the key next to the return key on the right side of the keyboard.
</p>
<div class="playfield">
<input type="text" value="" class="regex" reference="hausen|roda">
<input type="text" value="" class="regex" reference="ham|New">
<div class="message"></div>
<ul class="examples">
<li>Waltershausen</li>
<li>Friedrichroda</li>
<li>Tabarz</li>
<li>Fischbach</li>
<li>Zeulenroda</li>
<li>Vieselbach</li>
<li>Sondershausen</li>
<li>Sömmerda</li>
<li>Nottingham</li>
<li>Newcastle</li>
<li>Birmingham</li>
<li>New York</li>
<li>Northampton</li>
<li>London</li>
<li>Hampstead</li>
<li>New Orleans</li>
</ul>
</div>
</div>
2 changes: 1 addition & 1 deletion steps/04-01-sets.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: step
title: sets
title: Sets
lang: en
---
<p>
Expand Down
22 changes: 11 additions & 11 deletions steps/12-01-predefined-sets.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<span class="regex">.*</span> can be used if you do not care about some content.
</li>
<li>
<span class="regex">\w</span> is for letters in <strong>w</strong>ords.
<span class="regex">\w</span> is for letters in <strong>w</strong>ords.
<span class="regex">\w</span> is the same as <span class="regex">[0-9a-zA-Z]_</span>.
</li>
<li>
Expand All @@ -29,21 +29,21 @@
you can use the capital letter e.g. <span class="regex">\S</span>.
</p>
<p>
The following text is from "Die Zwölf Weihnachtsfeiertage" by Gerhard Schone
[<a target="_blank" href="http://www.sing365.com/music/lyric.nsf/Die-Zw%C3%B6lf-Weihnachtsfeiertage-lyrics-Gerhard-Schone/D41B005B291D4040482578D4001AB755">source</a>].
The following text is from "The Twelve Days of Christmas" by Harry Belafonte
[<a target="_blank" href="https://www.sing365.com/lyrics/The-Twelve-Days-of-Christmas-lyrics-Harry-Belafonte/BC1DF2E550EB342CA3330E17C8693FEA">source</a>].
Here, animals are counted.
Find all lines in which a number is followed by space followed by a word.
</p>
<div class="playfield">
<input type="text" value="" class="regex" reference="\d\s\w">
<div class="message"></div>
<ul class="examples">
<li>Am 5. Weihnachtstag</li>
<li>schenkte mir mein lieber Schatz</li>
<li>5 Füllhörner</li>
<li>4 Pfirsiche</li>
<li>3 Drosselchen</li>
<li>2 Zwiebelchen </li>
<li>und für’n Birnenbaum 1 Spatz.</li>
<li>On the 5th day of Christmas</li>
<li>my true love sent to me</li>
<li>5 golden rings</li>
<li>4 calling birds</li>
<li>3 French hens</li>
<li>2 turle doves</li>
<li>and a partridge in a pear tree.</li>
</ul>
</div>
</div>
3 changes: 1 addition & 2 deletions steps/12-02-predefined-sets.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
lang: en
---
<p>
HTML ist die Sprache, mit der Webseiten geschrieben werden.
HTML is the language used to write websites.
HTML tags start with <span class="regex">&lt;</span> end and with <span class="regex">&gt;</span>.
in between there is text.
Expand Down Expand Up @@ -35,4 +34,4 @@
At the bottom you can find the regular expressions.
The language HTML can not be described using a regular expression.
But, parts if the language like tags can be described using a regular expression.
</p>
</p>
1 change: 0 additions & 1 deletion steps/13-02-wiederholungen-zaehlen.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
layout: step
title: Wiederholungen Zählen
Expand Down