Solve fifth problem using regexp but it seems there are easier ways :D