【发布时间】:2021-10-12 08:30:06
【问题描述】:
想在 Notepad++ 中使用正则表达式查找/替换将小写文本上的方括号更改为圆括号(括号)
但不影响第一个字母为大写字母 A-Z 的方括号
括号可以跨越两行。试图显示示例,但论坛使其成为单行。必须使用双 CR
改变这个:
[indistinct chatter]
[indistinct chatter
across the room]
[Maya sighs]
[George yelling
from across the street]
到这里:
(indistinct chatter)
(indistinct chatter
across the room)
[Maya sighs]
[George yelling
from across the street]
尝试了一些变化来找到这个:[以前在 Hit & Run]
\[([a-z][\U\s]*)\]
\[([A-Za-z][A-Za-z\s]*)\]
\[([a-z][a-zA-Z\s]*)\]
\[([a-z][A-ZA-Z\s]*)\]
\[([A-Z][A-Za-z\s]*)\] .... thought this was gonna do it
找到此文字:[Ron groans]
未找到:[Previously on Hit & Run] 其 &,如何包含特殊字符?
当在表达式中使用大写字母时,如何找到小写字母?
查找:\[([^A-Z].+?)\]
【问题讨论】: