Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-24-2010, 02:16 PM   #1
brianh
Junior Member
brianh began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2010
Device: Kindle 2
Word question

I know this is not the "MS Word" forum, but I'm trying to edit Word docs before converting to RTF and import into Calibre. Does anyone know how to Find/Replace broken sentences? Something like this in Word:

"Wind

and"

I can search for them (^$^p), but a replacement would loose my ^$ character. Using BBEdit or Jedit would give me better control, but then I loose all my formatting.
brianh is offline   Reply With Quote
Old 08-24-2010, 02:38 PM   #2
rhk
Member
rhk began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Mar 2009
Location: Zürich, Switzerland
Device: Kindle
my lame solution was to search for: a^p (the letter A with no space, followed by a carriage return) replace with a[space] (the letter A with a space). Continue through all the letters in the alphabet. It cleaned up most everything nicely.
rhk is offline   Reply With Quote
Old 08-24-2010, 03:58 PM   #3
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,830
Karma: 4193095
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
You could try the following, which is 4 passes. I wrap them in a Word macro to make it less tedious.

Pass 1 - with 'Use wildcards' option unchecked
Code:
Find:^w^p
ReplaceAll:^p
Pass 2 - with 'Use wildcards' option unchecked
Code:
Find:^p^w
ReplaceAll:^p
Pass 3 - with 'Use wildcards' option checked
Code:
Find:([!-])^13([a-z])
ReplaceAll:\1 \2
Pass 4 - with 'Use wildcards' option checked
Code:
Find:([-])^13([a-z])
ReplaceAll:\1\2
Notes:
  • Pass 1 - remove trailing spaces
  • Pass 2 - remove leading spaces
  • Pass 3 - remove end-of-paragraph char and replace with space if last-char of 1st line is not hyphen AND first-char of next line is lowercase a-z
  • Pass 4 - remove end-of-paragraph if last-char of 1st line is hyphen and first-char of next line is lowercase a-z
jackie_w is offline   Reply With Quote
Old 08-24-2010, 04:10 PM   #4
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,830
Karma: 4193095
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
... follow-up. You are advised to do this before you spend a lot of time formating your document as any Find/Replace which removes end-of-paragraph markers is prone to removing formating associated with that paragraph.
jackie_w is offline   Reply With Quote
Old 08-24-2010, 05:12 PM   #5
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80520
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
I don't know about Word, but OpenOffice supports regexp-searches, using which your problem would boil down to replacing "\n\n" with "", I believe. Try it, it's free
Manichean is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classic Noob Question on Word Lookup boxer Barnes & Noble NOOK 4 07-31-2010 09:22 AM
question about Word joycedb Writers' Corner 7 06-23-2010 04:03 PM
Newbie basic question re Word documents GA Russell Which one should I buy? 15 09-17-2009 09:55 PM
Using a Word format for PRS-505 question jairizarry Workshop 1 05-03-2009 08:38 PM
Question about doing some searching and replacing in Word texasnightowl Workshop 6 09-11-2008 09:20 AM


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


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