Questions tagged [exact-string-matching]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7
votes
0answers
832 views

Minimal regular expression that matches a given set of words

I have a dictionary-like regular expression, an "or chain" of words, word1|word2|word3|... Unfortunately, the chain is too large. I'd like to find the minimal ...
5
votes
3answers
5k views

Is there a data structure for efficiently searching a string that contains a given substring?

This question arose from a practical problem: given a set of texts, find one, which contains a given string (not word). Let $S$ be a set of $n$ strings, and $l$ the length of the longest string in $S$...
4
votes
4answers
2k views

Substring in a infinite sequence of numbers

I have an infinite sequence of numbers, starting from 1 and need to find position of begin of some given substring of numbers. Example: 1234567891011121314151617181920 ... S = 141 Result: 18 All ...