fixing a regex gone bad