View Single Post
Old 09-04-2011, 06:33 AM   #3
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 74,045
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Unless you really, really want this book, ask Amazon for a refund and move on to something formatted properly.

If you do really, really want the book, still complain bitterly to Amazon about the poor formatting, but the way to fix it is like this.

Use a text editor that understands regular expressions. Search for something like:

_([a-z ]+?)_

and replace with

<i>\1</i>

And then check for any underscores that haven't been replaced. The first regular expression says "seach for an underscore and then the smallest number of letter and spaces possible until another underscore, and remember the text between the underscores". The second says "replace what was found by <i> followed by the first bit of remembered text, followed by </i>"


Quote:
Originally Posted by organized_chaos View Post
Every word that should be in italics is surrounded by _underscores_. I want to edit this book and change the underscores to italics but I'm not sure how.
[...]
How can I accomplish my goal without manually replacing everything one at a time?
pdurrant is offline   Reply With Quote