This regex stuff is getting out of hand