Use proper regexp

Because "^" means beginning of line, but "\A" means beginning of word.