Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
Alexandrina1
Femeie
22 ani
Arges
cauta Barbat
22 - 46 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [WORD] Wildcard Replacement of Paragraph + Number + Text + Paragraph Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
Mrrrr
AdMiN

Inregistrat: acum 17 ani
Postari: 2186
I scanned a book in order to convert it to text for my Kindle and the book had its title written on top of every page.

In order to lose all that in Word without having to go page by page (book has over 300 pages in my case), you can of course use wildcard replace.

I practically want to replace the following lines with a space or with nothing, depending if a word started on a page and ended on another being separated into syllables, or with a space if a page ended in a full word and started with another full word.

Thus I have 2 situations:

Note: in the examples below XXX is page number which can have 1, 2 or 3 digits (pages range from 1 to 327; ZZZZZZZZZZ is book title; ^p is a paragraph mark

1st situation - word starts on one page and ends on another, being separated by a hyphen
inte-^p
XXX^p
ZZZZZZZZZZZZZZZZZZ^p
rior

2nd situation - page ends with full word, next page starts with another full word
eforturile^p
XXX^p
ZZZZZZZZZZZZZZZZZZ^p
prin

Note on using wildcards:
- the paragraph mark is no longer ^p but ^13
- a number containing digits between 0 and 9 and of any number of digits is written [0-9]@

So I must make 2 replacements, one for 1st situation and one for 2nd.

1. Make backup of document.

2. Open Find and replace (CTRL+H), click on More >> and select Use wildcards.

3. Find what: -^13[0-9]@^13BOOK_TITLE_HERE^13
   Replace with:

4. Find what: ^13[0-9]@^13BOOK_TITLE_HERE^13
   Replace with: press spacebar once

I have a 3rd situation apparently, for some reason some page titles contain the following syntax:

word^p
ZZZZZZZZZZZZZZZZZZ                     XXX^p
word

So there's a paragraph, then book title, then a bunch of spaces, then page number, then paragraph. I have to replace all that with a space.
Below, any number of spaces is: [ ]@([! ])

Find what: ^13BOOK_TITLE_HERE[ ]@([! ])[0-9]@^13
Replace with: press spacebar once


_______________________________________


pus acum 2 ani
   
Pagini: 1  

Mergi la