Exercises from http://qntm.org/files/re/re.html