• Finding Paragraph Marks Using Wildcards

    Author
    Topic
    #353951

    I’m using Word 2K and need to replace a complex string. As a part of the Find What string, I’d like to use the ^p to find a paragraph mark, but the dialog won’t allow that control sequence if I’m using wild cards. How can I get around this problem to find paragraph marks?

    Thanks.

    Viewing 1 reply thread
    Author
    Replies
    • #519039

      You’re going to have to use a little trick here. Since you can’t find paragraph marks (^p) when using wildcards, you have to find something else that represents the paragraph marks.

      Step 1:
      With wildcards turned off, Find all ^p and replace with ~^p
      (Note: this example assumes that there were no occurences of ~ to begin with. If there are, you need to pick another character.)

      Step 2:
      Now, with wildcards turned on, to find the paragraph marks, enter ~? (i.e., ~ followed by any char.). This works because we know that the only character following ~’s are paragraph marks.

      Step 3:
      After everything is finished, clean up your document by replacing all the ~’s with nothing.

      • #520456

        There’s an easier way! Use the ASCII character code for paragraph mark, i.e. ^13. There is a Word help screen that lists this and other useful codes that work with wildcards turned on. Get to it by searching on Wildcards in the help menu and then following the links.

        Don.

        • #520568

          Don

          I cant find this screen in word 97, are you using word 2K? Any way you can post it here if so? Thanks in advance

          Dave

          • #520596

            Dave: Yes I am using Word 2K, but you should be able to do the same in Word97. I found the screen in help by searching for find/replace, then clicking on “troubleshooting find/replace” and picking the option “When I use wildcards, Word can’t search for certain items”. Below is the resulting screen (not formatted nicely but you get the idea).

            Don.

            —————

            When I use wildcard characters, Word can’t search for certain items.
            To use wildcards, click Find or Replace on the Edit menu, click More, and then select the Use wildcards check box. When this check box is selected, Word doesn’t recognize the codes you enter in the Find what box for the following items: endnote and footnote marks, fields, paragraph marks, section breaks, or white space. To search for these items, you can type the following substitute codes in the Find what box. (Note that no substitute code is available for fields.)

            To specify Type Notes
            Footnote mark or
            endnote mark ^2 Word can’t distinguish between footnote marks and endnote marks.
            Paragraph mark ^13
            Section break ^12 Word will search for manual page breaks as well as section breaks.
            White space space {1,} Type a space and then {1,}.

    • #519103

      Try a ^013 instead

      • #519142

        This is odd. Help says to use ^13, but your ^013 and even ^0013 work fine. Here’s the help screen:

        To specify Type Notes
        Footnote mark or endnote mark
      • #519171

        That’s just ticket. I didn’t realize you could use the control codes in the find what box. This makes the removal of multiple CRs in an imported text document, much more straight forward too.

        Thanks for the help.

    Viewing 1 reply thread
    Reply To: Finding Paragraph Marks Using Wildcards

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: