add two little regex tricks.