View Single Post
Old 05-17-2009, 06:28 AM   #22
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by Jellby View Post
I would, but it's not vim-regexp... would you care explaining it?
It's about as standard regexp as they come. I use specifically FAR Manager's Regular Expression Search And Replace plugin, but the same code would work with e.g. PHP's ereg(i).

Quote:
What would it do with:
Code:
'Don't come callin' 'em so late'
It wouldn't do anything becayse the sentence doesn't have a proper punctuation and no HTML paragraphs. If you wanted to convert:
Code:
<p>'Don't come callin' 'em so late.'</p>
or even
Code:
<p>'Don't come callin' 'em so late,' he said angrily.</p>
it would convert it into:
Code:
<p>{left_quote}Don't come callin' 'em so late.{right_quote}</p>
After that, you could do a simple search-and-replace for changing apostrophes to &{hash}8217;. Though I would postpone that until after I read the book through to make sure there were no forgotten quote-apostrophes left.
pepak is offline   Reply With Quote