We design binary sequences such that the position of any length-k contiguous subsequence can be detected exactly or approximately from a noisy observation of this subsequence. We study fundamental limits and practical sequence constructions in various detection scenarios for applications such as positioning systems.