How to match nested function invocations (bracket pairs) using a regular [removed]recursive?)

后端 未结 3 1923
甜味超标
甜味超标 2021-01-19 08:24

I\'m looking for a regular expression (**) that will match an unknown number of nested functions. So

expression
function(expression)
function(function(expres         


        
3条回答
  •  逝去的感伤
    2021-01-19 08:35

    Worth noting as per Bart Kiers's answer that some regex engines (excluding Javascript) have extended features to provide recursive matching - but such a feature shouldn't be considered to be a regular expression as per the formal definition.

提交回复
热议问题