Of course it isnt working; you told me the format was
())
so thats what it is looking for.
const string matchNumerator1 = @"root:\[(?<Numerator4>((?<p>\()|[^\(\)]|(?(p)(?<-p>\))|))*)\]";
const string matchDenominator1 = @"\{(?<Denominator4>((?<p>\()|[^\(\)]|(?(p)(?<-p>\))|))*)\}";
the above code will find the string you need.
Once again,
i cannot understate the importance of learning what the code is doing. The numerator and denimonator code hasnt changed at all from the fraction regex. All that has changed is the enclosing parentheses.
\((?<Numerator4>((?<p>\()|[^\(\)]|(?(p)(?<-p>\))|))*)
\)
root:\[(?<Numerator4>((?<p>\()|[^\(\)]|(?(p)(?<-p>\))|))*)
\]
You could have easily changed the symbols yourself. I'm not trying to rant or condescend but, if you are trying to learn how to code, these are the kind of problems you will face all the time and learning how to overcome them yourself will make you a much stronger programmer. Every time you encounter new syntax, or a structure you havent used before, experiment with it, read the documentation for it, disect it. You need to understand exactly what its doing so that you can adapt it for future problems. The same goes for code that you are given in forums. We will gladly help you out and provide you with code, but its SO important that you dont just copy and paste the code and move on...learn why the code you are given works. Look at how it has been structured so that you can learn how other coders solve problems.