title: c# regex matches exclude first and last character
body: <p>I know nothing about regex so I am asking this great community to help me out.
  With the help of SO I manage to write this regex:</p>
  
  <pre><code>    string input = "((isoCode=s)||(isoCode=a))&amp;&amp;(title=s)&amp;&amp;((ti=2)&amp;&amp;(t=2))||(t=2&amp;&amp;e&gt;5)";
      string pattern = @"\((?&gt;\((?&lt;DEPTH&gt;)|\)(?&lt;-DEPTH&gt;)|.?)*(?(DEPTH)(?!))\)|&amp;&amp;|\|\|";
      MatchCollection matches = Regex.Matches(input, pattern);
      foreach (Match match in matches)
      {
          Console.WriteLine(match.Groups[0].Value);
      }
  </code></pre>
  
  <p>And the result is:</p>
  
  <pre><code>((isoCode=s)||(isoCode=a))
  &amp;&amp;
  (title=s)
  &amp;&amp;
  ((ti=2)&amp;&amp;(t=2))
  ||
  (t=2&amp;&amp;e&gt;5)
  </code></pre>
  
  <p>but I need result like this (<em>without first/last "(", ")"</em>):</p>
  
  <pre><code>(isoCode=s)||(isoCode=a)
  &amp;&amp;
  title=s
  &amp;&amp;
  (ti=2)&amp;&amp;(t=2)
  ||
  t=2&amp;&amp;e&gt;5
  </code></pre>
  
  <p>Can it be done? I know I can do it with substring <em>(removing first and last character)</em>, but I want to know if it can be done with regex.</p>