Deleting text using Find/Replace

Anonymous
2023-08-17T22:33:00+00:00

Hello,

I would like to use te find/replace feature in Word to find "DELETE XXXXXX" and replace it with a line break. XXXXXX can be any word. Please advise. Thank you!

Debbie

Microsoft 365 and Office | Word | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Jay Freedman 205.9K Reputation points Volunteer Moderator
    2023-08-19T11:50:57+00:00

    Hi Debbie,

    The trick to replacing many unknown words is to use a wildcard search. For this specific task:

    • Open the Replace dialog (Ctrl+H) and click the More button to expand the bottom of the dialog.
    • Check the box for "Use wildcards".
    • In the Find What box, type or copy/paste the search expression

    DELETE [A-Za-z0-9 .,]@^13

    • If you want to remove the entire line including the paragraph mark, leave the Replace With box empty. To keep the paragraph mark, type ^p in that box.

    • Click the Replace All button. That will remove every line in the document that matches the search expression.

    For more information about wildcard searches, see https://www.gmayor.com/replace_using_wildcards.htm .

    6 people found this answer helpful.
    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-08-17T23:40:20+00:00

    Dear respected DebbieKops,

    Good day! Thank you for posting to Microsoft Community. We are happy to help you.

    As per your description, if you want to replace specific word with a line break, in Word 365 press Ctr+H and "Find with" box type the specific word that you want to replace and in "Replace" box type either ^l or ^p

    If there is any misunderstanding, I apologize and please feel free to post back to us with more detailed information for better understanding and guiding you further.

    Appreciate your patience and understanding and thank you for your time and cooperation.

    Sincerely,

    Waqas Muhammad

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-08-17T23:54:05+00:00

    Hello,

    I am not searching to replace a specific word. I have the template with "DELETE" in front of the word I'd like to delete. For instance, if it says "DELETE Project Manager," I want find/replace to delete "DELETE Project Manager" and insert a line break. The template is not only limited to the words "Project Manager." Depending on the role that is merged out, it can be "DELETE Project Engineer." I hope I'm explaining myself more clearly. Thank you!

    0 comments No comments
  3. Jay Freedman 205.9K Reputation points Volunteer Moderator
    2023-08-18T01:30:32+00:00

    Is there some character (possibly a paragraph mark) that always appears at the right end of the text that you want to delete? If there is no such character, is the text that follows DELETE always two words -- not one and not three or more? Those possibilities are the only way to ensure that the proper text gets replaced.

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2023-08-18T03:02:01+00:00

    Hi Jay,

    That's what makes this tricky - the titles can range from any number of words. I do, however, have a paragraph mark at the end of each title. How would I go about deleting the entire line?

    0 comments No comments