View Single Post
Old 11-28-2014, 04:25 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
The search function in a plaintext editor shouldn't and won't strip non-displaying characters.

A simple regex like
Code:
f@?o@?o@?b@?a@?r
would find the word "foobar" with optional soft hyphens. Note: the at symbols are a placeholder for the aforementioned unicode ­ character.

You will indeed need a regex, because regexes are by definition what you use to find a fragment of text that can appear in multiple forms -- which is the case here.



On the other hand, I would venture to say, the best solution is... don't hyphenate the book until it reaches production and goes on your ereader. Remove all ­ symbols from the book (de-hyphenate it) and searching in ebook-editors will work properly.

Then hyphenate them when they are ready to be pushed to your device. The ereader/app should handle searching just fine, much like the way they don't break on span tags.
eschwartz is offline   Reply With Quote