Make regex matching more strict by surrounding the pattern with ^ and $