Results 1 to 10 of 10
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Replace with wild cards? (WinNT/Word97)

    I know that you can find combinations where one character is not known but is it possible to replace using the same character that the wild card found?

    For instance (^#) will find any number in brackets, but could I then tell it to replace all instances of this with -^#- where the ^# character would be the same character found in that particular instance? Or to make all instances of (^#) bold (ie replace with the same characters but in bold)?

    Any help would be greatly appreciated!
    Beryl M


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Replace with wild cards? (WinNT/Word97)

    Check the "Use Wildcards" box in the Replace dialog.

    If you want to replace a single digit surrounded by parentheses with the digit preceded by a minus sign, enter (([0-9])) in the Find What box and -1 in the Replace With box.

    If you want to replace any number surrounded by parentheses with the number preceded by a minus sign, enter (([0-9]@)) in the Find What box.

    Isn't it fun? Try and see if this does what you want. If you need explanations, please holler.

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Replace with wild cards? (WinNT/Word97)

    If I'm understanding you correctly, to replace (#) (normal weight) with (#) (bold) - where the # indicates any number - I would put (([0-9])) in the find box and ((1)) in the replace box (and mark it to be formatted in bold)?

    Trouble is when I do that it says it's checked the document and hasn't found any - and needless to say there are loads! That's only on pressing Find, by the way, we haven't got as far as Replacing!

    <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Beryl M


  4. #4
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Replace with wild cards? (WinNT/Word97)

    Don't worry, solved that one - I hadn't got the wildcards box ticked (I've never used them before!).

    However, now it says "The Replace With box contains a group number which is out of range" ...!!
    Beryl M


  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Replace with wild cards? (WinNT/Word97)

    To replace (3) with (3), use this in the Find What box: (([0-9]@)) and this in the Replace With box: 1 and set the format for Replace to Bold (notice the subtle differences)

    If you only want to replace single digits, you can also do this without wildcards: (^#) in Find What, ^& in Replace With, and set format for Replace to Bold.

  6. #6
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Replace with wild cards? (WinNT/Word97)

    Hans, you're brilliant! Is there somewhere where all these options are listed that I can look up? 'Cos I couldn't find anything in the help section of Word ...

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> again!
    Beryl M


  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Replace with wild cards? (WinNT/Word97)

    If you type either replace or wildcard in the help index, you should be able to find the info, if I remember correctly.

  8. #8
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Replace with wild cards? (WinNT/Word97)

    'Replace' has no entries; the entire contents of the 'Use conditions and values in the Advanced Find Dialog box' (found with 'wildcard') is as follows:

    <font color=blue>Use conditions and values in the Advanced Find dialog box

    The conditions available depend on the property selected. Some conditions require a value. When you select a property and a condition, if the Value box is available, the condition requires a value.

    You can use operators such as and and or in the Value box to separate multiple values. For example, to find files with the author Mary or John, click Author in the Property box. Click includes words in the Condition box, and then type Mary or John in the Value box. If you leave a space between the values you're searching for, you get the same result as the and operator; for example, Mary John in the Value box has the same result as Mary and John.

    For text fields
    You can use wildcards in the Value box with the includes and is (exactly) conditions. Type ? to find any single character, or type * to find any string of characters. For example, s?t finds "sat" and "set"; s*d finds "sad" and "started."

    For numeric values
    To use the any number between condition, in the Value box, type the two numbers you want the value to be between, separated by the word and. For example, type 1 and 5

    For date values
    To use the any time between condition, in the Value box, type a first and second date, separated by the word and. For example, type March 1, 1996 and March 30, 1996.</font color=blue>

    Do you (or anyone else?) have a more recent version of Word that might actually list these variables and how to use them? Or maybe know of somewhere else that has such a list? Micro$oft don't exactly make it easy to find these things out, do they! Them and their "Undocumented features" ...!

    <img src=/S/sigh.gif border=0 alt=sigh width=15 height=15>
    Beryl M


  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Replace with wild cards? (WinNT/Word97)

    I have attached a zipped document with the Word 2002 help page. Formatting didn't survive intact, and pictures not at all, but perhaps you can use it.
    Attached Files Attached Files

  10. #10
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Replace with wild cards? (WinNT/Word97)

    Thanks for that, Hans, that was exactly what I was looking for! And I can't find it anywhere in the Word 97 help - even with your 2002 example to help point me in the right direction! It talks about the characters starting with ^ and word forms, etc, but the numbers bits aren't mentioned anywhere - it's almost as if they aren't supposed to used in this version (you know the saying - "it was impossible, but the fool didn't know it and went ahead and did it anyway"!!!)

    Again, <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    Beryl M


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •