Skip to content
Snippets Groups Projects
Forked from TheAlternative / courses
350 commits behind, 26 commits ahead of the upstream repository.

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.


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

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