template regex mistake