2004 wildcard fix

A

A. Hill

Just downloaded the Office 2004 trial copy. At last! MS has fixed the
"number of occurrences" wildcard in the Find dialog. It hasn't worked
(in the Mac versions only, thank you very much) since Word 98.

I wonder how many people wasted hours over this one in the
intervening years. I guess it finally bubbled up the bug-fix list.

The most obvious use is to get rid of multiple consecutive word spaces
in a document:

Find: space{2,} (two or more consecutive space characters)
Replace with: space (one space character)

HOW: In the Find/Replace dialog click the down arrow to see more
options. Check the Wildcards box. Choose Num Occurrences from the
Special pop up list. Type a spacebar character in front of the wildcard,
not the word "space." Unfortunately, spaces are invisible in the field.
Type 2 after the open bracket, to indicate the low end of the range. You
can type a maximum number after the comma if you want to, or leave
it unlimited.

Watch out if you're searching for letters. It's case sensitive. No choice.

Is there anyone out there as insanely happy as I am? My macros will be
s i m p l e again. I hope I'm not dreaming. Pinch, pinch.
 
C

Corentin Cras-Méneur [MVP]

Is there anyone out there as insanely happy as I am? My macros will be
s i m p l e again. I hope I'm not dreaming. Pinch, pinch.

Yep... I'm a big fan of wildcard. Any improvement in this area makes me happy
(though I keep on thinking Word deserves a REAL grep-like wildcard support).
THe curent limitations in wildcard support still require me to copy and paste
text to BBEdit to perform search and replace using regular expressions.


Corentin
 
D

Dayo Mitchell

Oh, good! In my very first venture into wildcards, I did waste some time on
that one. I've got a macro from someone else that I can use now, or that
is, in several months when I upgrade.

Thanks much for the report and the nice clear example, greatly appreciated,
I'm sure by others as well.

DM
 
A

A. Hill

Corentin Cras-Méneur said:
Yep... I'm a big fan of wildcard. Any improvement in this area makes me happy
(though I keep on thinking Word deserves a REAL grep-like wildcard support).
THe curent limitations in wildcard support still require me to copy and paste
text to BBEdit to perform search and replace using regular expressions.


Corentin

Alas, I don't see any new tools here. Nothing new in Help. ~A
 
A

A. Hill

Dayo Mitchell said:
Oh, good! In my very first venture into wildcards, I did waste some time on
that one. I've got a macro from someone else that I can use now, or that
is, in several months when I upgrade.

Thanks much for the report and the nice clear example, greatly appreciated,
I'm sure by others as well.

DM

You are most welcome. Have fun. ~A
 
C

Corentin Cras-Méneur [MVP]

Alas, I don't see any new tools here. Nothing new in Help. ~A

Indeed. Just a few bug fixes. Nevertheless, there is still the possilibty to
pipe the text to BBEdit or grep through AppleScript. I've been to lazy to
write the code for myself, I simply copy and paste between apps. Since the
tools weren't there I got used to work as much as I could in BBEdit and then
transfer the text to Word for formatting.


Corentin
 
A

A. Hill

Corentin Cras-Méneur said:
Indeed. Just a few bug fixes. Nevertheless, there is still the possilibty to
pipe the text to BBEdit or grep through AppleScript. I've been to lazy to
write the code for myself, I simply copy and paste between apps. Since the
tools weren't there I got used to work as much as I could in BBEdit and then
transfer the text to Word for formatting.


C,
What is grep? I don't know it.
I may not be able to take advantage of it, since my macros are for
user's toolbars in Word, but I'm curious.

Now the bad I just noticed a possible unfixed wildcard bug.
To find paragraph marks in a wildcard expression, Help says to use
^13.
In my 2004 test drive, it doesn't find them, although ^12 does find
section breaks as promised.
I tried using (^13). It finds the first, but if you Find Next you get
the spinning beachball.
I think I've seen complaints about this in this forum before.
I guess we'll see a fix in, oh say, 2008. ~A
 
J

John McGhie

Hmmm... Nope, not here. ^13 works as advertised. Try ^p. If you get the
same result with ^p (must be lowercase 'p') you have a corrupt document.

(The difference is ^13 is looking for Character number 13, the New Line, ^p
is looking for "a paragraph mark" (which is not a character, it's a
container of information)).

Cheers


C,
What is grep? I don't know it.
I may not be able to take advantage of it, since my macros are for
user's toolbars in Word, but I'm curious.

Now the bad I just noticed a possible unfixed wildcard bug.
To find paragraph marks in a wildcard expression, Help says to use
^13.
In my 2004 test drive, it doesn't find them, although ^12 does find
section breaks as promised.
I tried using (^13). It finds the first, but if you Find Next you get
the spinning beachball.
I think I've seen complaints about this in this forum before.
I guess we'll see a fix in, oh say, 2008. ~A

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 
C

Corentin Cras-Méneur [MVP]

C,
What is grep? I don't know it.

grep is a command line application (installed with your system) that allows
you to perform Regular Expression search and replace through the Terminal.
You can combine it with the pbcopy and pbpaste commands to create
AppleScripts that will copy text, perform the search and replace with grep
and paste the result back in the Word document.
I may not be able to take advantage of it, since my macros are for
user's toolbars in Word, but I'm curious.

Launch the Terminal and type "man grep"
You can also use other very powerful tools line sed and awk. These are rather
complex command line applications but they will sure do whatever complex
search and replace job you might ever need.

Now the bad I just noticed a possible unfixed wildcard bug.
To find paragraph marks in a wildcard expression, Help says to use
^13.

You need ^p for paragraph marks.
In my 2004 test drive, it doesn't find them, although ^12 does find
section breaks as promised.
I tried using (^13). It finds the first, but if you Find Next you get
the spinning beachball.
I think I've seen complaints about this in this forum before.
I guess we'll see a fix in, oh say, 2008. ~A


I gave it a try and ^p found the paragraph marks one after the other without
any problem.


Corentin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top