我正在寻找一种方法从另一个子串中删除大括号内的任何子串.
例如:
"The cat is {not} mine"
"The cat is mine";
"the glass was broken {by the dog}"
"The glass was broken "
我已经读过可以在replace函数中使用正则表达式,但我不知道如何使用它.
replace
javascript regex string replace
javascript ×1
regex ×1
replace ×1
string ×1