missed global flag for escape regex