View Single Post
Old 09-21-2010, 05:28 AM   #3
comtrjl
Connoisseur
comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.comtrjl ought to be getting tired of karma fortunes by now.
 
Posts: 75
Karma: 204999
Join Date: Aug 2006
Location: London
Kevin,

this needs to be done in 2 or 3 stages, because legit question marks may appear at the end of sentences, usually followed by either a space (if in the middle of a paragraph) or a paragraph mark (if at the end of the paragraph). These ones need to be preserved so I'd do a search/replace for ?<space> and ?^p and replace with e.g. ##<space> and ##^p respectively.
Then you'd have to look through and see if there are any other legit question marks that need to be preserved and change any you find into ##.
At this point all legit ones should be replaced by ## so you can deal with the illegit ones.
First, you have to enable wildcards with the 'More' button.
Next do a search for ([a-z])?([a-z]) - this should find any remaining question marks like your example - i.e. a question mark with a letter either side.
Replace with \1'\2 - the \1 and \2 bit is to restore the left and right letters demarcated by the round brackets above with an apostophe in the middle.
You can click on the Replace button to see each one before messing with it or take a chance on Replace All.
Finally, turn off wild cards and do a search for ## and replace it with a question mark so all the legit ones reappear.
Sounds worse than it is .. :-)

Good luck,
bob
comtrjl is offline   Reply With Quote