Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 Notepad++ 或 Ultraedit 删除 [ ] 字符之间的字符串
将被删除的字符串
avenged sevenfold [ something ] dear god
就像下面一样
avenged sevenfold dear god
我尝试像这种模式一样删除它:
\[[^]]+\]
但它没有用。
正则表达式是:
\[[^\]]+\]
]注意字符类内部的转义。
]
如果您想删除尾随空格以使其完全符合您的规范,请在\s*其末尾添加 a。
\s*