View Single Post
Old 10-18-2010, 02:21 AM   #1
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
regex for character replacement, em-dash questions

I'm hoping to learn how to fix up various small annoyances in conversions via regex & have some related questions.

1. em-dash, en-dash - to mess with these, how do I type the characters into the regex i.e. is there a way to generate an emdash or endash with the keyboard ?

2. find + replace syntax: I see lots of helpful examples for removing stuff with regex but what is the generic construction of a find / replace all command

3. as a specific, I could fix up one book if I could replace all "?" with em dash, EXCEPT for those ? which are followed by a close speech quote. this would take 3 passes in word: 1. change all ?" to , say, QMQM". 2 change all "?" to em dash. 3 change all QMQM back to ?"

PS following a link to here https://wiki.mobileread.com/wiki/Special_characters
I read that em-dash, en-dash are NOT supported on Kindle, but it does not say what would be displayed if one was included in a .mobi file - I assume that the .mobi spec does support them ?

Last edited by cybmole; 10-18-2010 at 02:29 AM.
cybmole is offline   Reply With Quote