4

I need a pattern to remove everything between the "<" and ">" characters. An example would be:

<blah blah blah>Something I want <blah blah>really bad<blah blah>

becomes

Something I want really bad

How would I go about doing this? I have looked up the word search patterns and tried using them (to no avail). If Word won't do it, is there an online tool that could?

barlop
  • 23,849

1 Answers1

6

I need a search pattern to remove everything between the "<" and ">" characters.

  • Set "Find What" to \<(*{1,})\>

  • Set "Replace with" to an empty string.

  • Check "Use wildcard"

Notes:

  • < and > are special characters that need to be escaped using \
  • * means any character
  • {1,} means one or more times

Further reading

barlop
  • 23,849
DavidPostill
  • 156,873
  • Your code works for < and > but it doesn't seem to work with [ and ] When I use wildcard with this : \[(*{1,})\] word can't find anything but if I only look for [ or ] without wild card, all the [ and ] are found. Any idea why? ( I tried with and without the \ to escape the [ and ] ). Thanks for your help! – MagTun Dec 10 '15 at 06:47
  • This is a different question to the OP. Please ask your own question and include examples of the text before and after you required changes. – DavidPostill Dec 10 '15 at 08:26
  • Sorry for this, here is my question: http://superuser.com/questions/1011506/remove-of-everything-between-and-in-word-regex – MagTun Dec 10 '15 at 08:50