Reg Expression for Getting Text with particular function name and with nested parentheses, I had tried but i am not getting the RegEx. For this example
ignore if open or close parentheses between single quotes or double quotes.
eg: strcat("thanks for", param(add(a,b)), ' and ( valuable time ).')
Regex.Matches(script, @"(?x) \( ( (?: [^()]+ | (?<open>\() |
(?<-open>\)) )* (?(open)(?!)) ) \)");
Example:-
blelow one is the string and function name is param,
if(a>b, param(add(c,d)), param(2));
Output =>
1) param(add(c,d))
2) param(2)