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-19T23:16:16+00:00

    Thank you, Jay! This solution worked perfectly. You're a genius!

    0 comments No comments