首页 新闻 搜索 专区 学院

正则表达式递归怎么写

0
悬赏园豆:30 [已关闭问题] 关闭于 2018-01-09 17:33

female{{initiator} has named the conversation “{topic}”} male{{initiator} has named the conversation “{topic}”} other{{initiator} has named the conversation “{topic}”}

female{{initiator} has left this conversation} male{{initiator} has left this conversation} other{{initiator} has left this conversation}

这两个字符串用正则表达式 .*?{.*?([^{])*\} 这里只实现了一句,另一句就不行。

通过female,male,other来分成三组 ( ?(female|male|other)({递归{}})形式来实现需要怎么做

实现的效果:
female{{initiator} has left this conversation}
male{{initiator} has left this conversation}
other{{initiator} has left this conversation}

Victor_huang的主页 Victor_huang | 初学一级 | 园豆:86
提问于:2018-01-09 13:23
< >
分享
所有回答(1)
0

方法里面调用本方法,网上的资料很多

gongdamo | 园豆:80 (初学一级) | 2018-01-09 17:16
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册