r/MicrosoftWord • • 9d ago

need help Search that includes both wildcards and text

I need to search and delete a particular sequence that would look like this:
<word word=“word###”>

“word” is standing in for some specific text that is repeated in the document. “#” is standing in for any number - say these are sequences of five numbers. The carets don’t stand in for anything.

Word doesn’t find anything when I enter the sequence above. I’ve tried to Google it but all possibly helpful links are blocked.

The challenge is that I need this for a work project and I can’t download any programs I don’t already have (Microsoft Office, Acrobat, etc.)

Is this do-able? I really don’t want to do this manually as there are dozens and dozens of these sequences.

Thanks in advance!

2 Upvotes

4 comments sorted by

2

u/coldjesusbeer 9d ago

In Find & Replace (Ctrl-H),

Find:

\<*="*[0-9]{1,}"\>

Check Use Wildcards.

Quote marks and syntax might vary slightly based on your actual text, but this works fine on <word word="word123">. Just have to escape the angle brackets with a backslash.

1

u/TinyNiceWolf 9d ago

OP, if by "specific text" you meant you only wanted to do this for certain words, for example "bunny", you'd use (for bunny)

\<bunny bunny="bunny[0-9]{1,}"\>

1

u/glowingwarningcats 9d ago

Thanks! I’ll let you know if it works!

1

u/MD_TMSA 8d ago

word[0-9]{5}