java正则表达式来查找具有特定起始字符和结束字符的单词
我有一些从网上抄来的文字。它包含了很多地方,我必须移除它们。很少有行和引用是这样的:
"
related to such contracts.[79]
References[edit]
smart contract platform.[65][66]
Quorum.[63] It's designed
separate version became Ethereum (ETH) with the theft reversed,[12]
and the original chain continued as Ethereum Classic (ETC).[13]
"
我尝试使用internet上的帮助:
^[\[]* [\]]$
我必须删除所有[*]
。我必须低于输出
"
related to such contracts.
References
smart contract platform.
Quorum.It's designed
separate version became Ethereum (ETH) with the theft reversed,
and the original chain continued as Ethereum Classic (ETC).
"
# 1 楼答案
这是你想要实现的吗?请确认
(?:\[\w+\]*)
此处测试:https://regex101.com/r/nr0H99/2