【发布时间】:2020-02-28 10:02:03
【问题描述】:
我有一个如下所示的 Markdown 链接列表:
[filename-with-some-words](/001-folder/filename-with-some-words.md)
[title-with-other-words](/001-folder/title-with-other-words.md)
[other-words](/001-folder/other-words.md)
我想替换出现在方括号[] 之间的-,而不是出现在括号() 之间的那些,这样我的最终结果将如下所示:
[filename with some words](/001-folder/filename-with-some-words.md)
[title with other words](/001-folder/title-with-other-words.md)
[other words](/001-folder/other-words.md)
我可以将括号中的所有文本与(?<=\[).+?(?=\])匹配,但我如何只匹配破折号-?
【问题讨论】:
标签: regex sublimetext3 regex-lookarounds