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.