Repaired regexp, added more tests.