Dapscoptyltd / Windows-and-Office-General

For issues and pointers for Windows.
0 stars 1 forks source link

Find and replace Wildcards in Word documents #2

Open Dapscoptyltd opened 6 years ago

Dapscoptyltd commented 6 years ago

The best way to remove multiple spaces throughout the document is to use Find & Replace. The Find string is [^32]{2,} and the Replace string is ^32 IMPORTANT. You must have Use Wildcards ticked. It is in the drop down menu under More >>

This will find all space character strings with two or more space characters and replace the string with a single space. If your document uses spaces to position text on the page then it will upset the positioning. But you would have been naughty to use space padding rather than tabs.

From 'Ken' on the Word-PC list.

Dapscoptyltd commented 6 years ago

For using wild cards, here are resources I've found. Wild cards Office help - good intro Next Office help - more good info

https://wordmvp.com/FAQs/General/UsingWildcards.htm

https://www.copyediting.com/wildcard-find-and-replace-changing-part-preserving-part/#.W8QBjy17HmE

Also found this on the Editorium with many thanks: chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://www.editorium.com/wildcard_reference.pdf
This is attached. wildcard_reference.pdf

Also (From superuser): enter mark ^13 tab ^t any lowercase letter [a-z] any uppercase letter [A-Z] any letter [A-z] any digit [0-9] any no. between 6–9 [6-9] any letter between d–k [d-k] any word contains only letters ([A-z]@>) any word contains only digits ([0-9]@>) for grouping (for replace) ( ) any character(s) between ... () any para ^13()^13 TO REPLACE

To replace first group \1 To replace second group \2 enter mark ^p tab ^t

Dapscoptyltd commented 6 years ago

Seems that the backslash search leave it alone wildcard in Word for Mac doesn't work unless you select use wildcards

Dapscoptyltd commented 6 years ago

To replace the ##-##-## structure I had to find: ([0-9])-([0-9])([0-9])-([0-9]) ([0-9])([0-9])-([0-9])([0-9])-([0-9])([0-9]) These worked perfectly.

The replace function worked this way: \1/\2\3/\4

The counterintuitive was the: # component must match the numerical place in which the [0-9] code fits into the find statement.

Dapscoptyltd commented 6 years ago

To find the middle zero in this: 27/06/05

Use this type of encoding int the find: 0([0-9]/)

And replace is thus: \1

The ( .... ) structure becomes the numeral...

So the combination of how you use the ([]) symbology is critical. WHY ISN'T THAT EXPLAINED, like 30 years before when Word was brand new? By smarter people than me?

Dapscoptyltd commented 6 years ago

THe structure: /4/4 suptra senmechoff aus corps.pdf

can be replaced with this type of combination: (/[0-9]/[0-9]).pdf The ( ...) becomes '1' The finds evrything up to the '.pdf'

The replace is simply: \1