Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 09-20-2010, 06:51 PM   #1
Big Kev
Enthusiast
Big Kev began at the beginning.
 
Posts: 25
Karma: 43
Join Date: Jan 2010
Location: Perth, Western Australia
Device: Kindle & Ipad
Help with Word - Find & Replace

Hi

Wondering if someone is able to help with some advice regarding find & replace in Word.

I have a large document that has a lot of similar mistakes in relation to apostropies which have all been replaced with a question mark.

For example the word don't appears as don?t so while the ? remains constant the letters on either side of it are not.

Is it possible to run a find of ^$?^$ with a replace operation that replaces the letters that were found with themselves whilst replacing the ? with an ' if that makes sense?

If so could you please advise how. If not does anyone have any ideas as it will be a pain to have to use spellcheck to correct these mistakes.

Thanks
Kevin
Big Kev is offline   Reply With Quote
Old 09-20-2010, 07:32 PM   #2
owl123
Addict
owl123 doesn't litterowl123 doesn't litterowl123 doesn't litter
 
Posts: 234
Karma: 214
Join Date: Nov 2008
Device: Galaxy Note 3, Galaxy NotePro 12.2, InkBook
Use UltraEdit's find and replace function. I've done similar things with it in the past.
owl123 is offline   Reply With Quote
Advert
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
Old 09-21-2010, 06:51 PM   #4
Big Kev
Enthusiast
Big Kev began at the beginning.
 
Posts: 25
Karma: 43
Join Date: Jan 2010
Location: Perth, Western Australia
Device: Kindle & Ipad
Hi all and thanks for the help.

Bob that's great, just what I was looking for and it works well for what I want to do.

For those like myself who have a lot to learn about the Find & Replace function (plus many other things) and like to understand how/why something works before pressing the button I stumbled upon the following site http://word.mvps.org/FAQs/General/UsingWildcards.htm after receiving Bob's advice. The site contains a reasonably easy to understand explanation of the theory behind using wildcards which I find handy as a reference.

Regards & Thanks again
Kevin
Big Kev is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
REGEX find and replace help please potestus Sigil 13 09-18-2010 04:14 PM
find and replace, epub ampsonic Reading and Management 3 03-02-2010 03:20 AM
Find/Replace with regular expression hydrolith Sigil 6 03-01-2010 08:42 PM
Crashes on find / replace all mr ploppy Sigil 1 02-03-2010 12:35 PM
Using Find/Replace with BD Otter Sony Reader 7 02-28-2009 01:49 PM


All times are GMT -4. The time now is 06:06 PM.


MobileRead.com is a privately owned, operated and funded community.