1

I want to delete strings between [ ] characters by using Notepad++ or Ultraedit

Will be deleted string

avenged sevenfold [ something ] dear god 

That will be just like below

avenged sevenfold dear god 

I try to delete it just like this pattern :

\[[^]]+\] 

but it did not work.

Ry-
  • 218,210
  • 55
  • 464
  • 476

1 Answers1

3

The regular expression is:

\[[^\]]+\]

Note the escaping of the ] inside the character class.

If you want to take out trailing spaces so that it’s exactly like your specification, add a \s* to the end of that.

Ry-
  • 218,210
  • 55
  • 464
  • 476