【发布时间】:2018-08-22 15:29:26
【问题描述】:
我正在寻找一个正则表达式,它检查仅以 1 个左大括号和任意数量的右括号开头的模式:
"something{word_or_not}}}}}}}"
#should return true.
"something{{word_or_not}}}}}}}}"
#should return false.
这是我得到"\{\w*\}\}+" 的距离,除了没有那么远,因为第二个示例返回true。
【问题讨论】: