View Single Post
Old 10-28-2009, 02:13 AM   #13
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
I like to use this regular expression:
Code:
Search = ([>_])'(.*?[^a-z_])'([<_])
Replace = $1{opening_quote}$2{closing_quote}$3
(replace _ in the search string with space)
It is intended for HTML source with reasonable typography (e.g. proper punctuation before closing quotes) and can't handle some situations (words starting with an apostrophe followed by real opening quotes), but apart from that it performs surprisingly well.
pepak is offline   Reply With Quote