我有一个这样的模式:#alphanumericX(anythingY){ anythingZ}#它可以像这样嵌套:#alphanumeric1(anything1){ #alphanumericX(anythingY){ anythingZ }#}#或者像这样:#alphanumeric1(anything1){ anything2 #alphanumericX(anythingY){ anythingZ }#}#模式不仅可以写一次,还可以像这样写多次:#alphanumericX(anythingY){ anythingZ}##alphanumeric1(anything1){ anything1}#我想要一个正则表达式来匹配上面的模式,所以它会像这样返回:#alphanumericX(anythingY){ anythingZ}#如何做到这一点?这是我当前的正则表达式: /#(.*?)\((.*?)\)\{(.*?)\}#/sm
1 回答
- 1 回答
- 0 关注
- 133 浏览
添加回答
举报
0/150
提交
取消