grep_exercise.md 1.3 KB
Newer Older
nilsl's avatar
nilsl committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# For the grep exercise

## Explanation

This is a textfile for use with the grep exercise. 
It contains some words, so you can search for patterns.

Dog
Dig
Dug

Here is a line containing a ## that is not at the beginning of the line because I am evil.

Brat

Cat
Rat
Sat
Mat
Wat
Latin
Pat
Hat
Fat
Vat
Tat
Bat


## Animals

This subsection contains a list of "animals".
(The plus signs are there to make things slightly easier for you. After all, it's fairly hard to distinguish animals from other words using only regexes)

+ Dangernoodle, a natural enemy of the Booplesnoot
+ Majestic Sea Flap-Flap
+ Dangerous Sea Flap-Flap
+ Trash Panda
+ Fart Squirrel (not as undangerous as it sounds)
+ Danger Floof - not to be confused with the Danger Water Cow
+ Nope Rope
+ Sword Pig (not as dangerous as it sounds)
+ Bacon Puppy
+ Dapper Chickens
+ and finally Strangerdanger which could be a name for a dog.

### This is a subsubsection

* It contains
* Some list elements
* Such as this one

### Code

Here's some code that can be searched.  
This is a bit harder, since the exercises corresponding to it, require regexes that span over multiple lines.

```java

class Main {
	public static void main(String[] args) {
		Out o = new Out();
		o.out();
	}
}

class Out {
	public void out() {
		System.out.println("Hello World!");
	}
}
```