I have a large text file that I need to search for certain substrings and I would like to use the speed-up that TextSearch gives. Unfortunately, with TextSearch queries will only match entire words:
f = Export["~/test.txt", "1234 1234"]; TextSearch[CreateSearchIndex@f, SearchQueryString["*23*"]] I'd prefer not to use StringCases as it is very slow on the large document. Is there some way around this?


Import? $\endgroup$"23~"as the search string.~is supposed to indicate a close but non-exact match. It does work in your simple case, but I don't know how well it would perform on a real example. $\endgroup$