title: Fix RegEx to properly capture text inside parenthesis
body: <h2>SCENARIO</h2>
  
  <hr>
  
  <p>Time ago I asked a question to format music filenames in certain conditions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/32807698/regex-pattern-to-limit-dashes-in-these-circumstances">RegEx pattern to limit dashes in these circumstances</a></li>
  </ul>
  
  <p>However, I noticed too late that the accepted answer is wrong, because it can capture any word starting with "F". But this is not a problem/question, I solved it just by restoring the <code>ft|feat|featuring</code> OR group.</p>
  
  <p>So finally from que question linked above, I ended up using this expression:</p>
  
  <pre><code>pattern := '^(.+)\s+-\s+(.+?)\s+(ft|feat|featuring)[\.\s]*([^([\])]+)(.+)?$' 
  replace := '$1 Feat. $4 - $2$5' 
  </code></pre>
  
  <p>Well, now, having these filenames to test:</p>
  
  <ol>
  <li>Black Coast - Trndsttr</li>
  <li>Black Coast - Trndsttr (Feather)</li>
  <li>Black Coast - Trndsttr (Lucian Remix)</li>
  <li>Black Coast - Trndsttr (Feather) (Lucian Remix)</li>
  <li>Black Coast - Trndsttr Feat. M. Maggie</li>
  <li>Black Coast - Trndsttr (Feat. M. Maggie)</li>
  <li>Black Coast - Trndsttr Feat. M. Maggie (Lucian Remix)</li>
  <li>Black Coast - Trndsttr (Feat. M. Maggie) (Lucian Remix)</li>
  <li>Black Coast - Trndsttr (Lucian Remix) Feat. M. Maggie</li>
  <li>Black Coast - Trndsttr (Lucian Remix) (Feat. M. Maggie)</li>
  <li>Black Coast - Trndsttr (Feather) (Lucian Remix) Feat. M. Maggie</li>
  <li>Black Coast - Trndsttr (Feather) (Lucian Remix) (Feat. M. Maggie)</li>
  <li>Black Coast - Trndsttr (Feather) Feat. M. Maggie (Lucian Remix)</li>
  <li>Black Coast - Trndsttr (Feather) (Feat. M. Maggie) (Lucian Remix) </li>
  <li>Black Coast - Trndsttr (Feather) (Feat. M. Maggie) Lucian Remix</li>
  <li>Black Coast - Trndsttr (Feather) Feat. M. Maggie Lucian Remix</li>
  </ol>
  
  <p>The expected results are these:</p>
  
  <p>(from 1 to 4 no changes, and 16 is an assumable false positive, it is in essence the same as 5, 9 and 11.)</p>
  
  <ol>
  <li>Black Coast - Trndsttr</li>
  <li>Black Coast - Trndsttr (Feather)</li>
  <li>Black Coast - Trndsttr (Lucian Remix)</li>
  <li>Black Coast - Trndsttr (Feather) (Lucian Remix)</li>
  <li>Black Coast Feat. M. Maggie - Trndsttr</li>
  <li>Black Coast Feat. M. Maggie - Trndsttr</li>
  <li>Black Coast Feat. M. Maggie - Trndsttr (Lucian Remix)</li>
  <li>Black Coast Feat. M. Maggie - Trndsttr (Lucian Remix)</li>
  <li>Black Coast Feat. M. Maggie - Trndsttr (Lucian Remix)</li>
  <li>Black Coast Feat. M. Maggie - Trndsttr (Lucian Remix)</li>
  <li>Black Coast Feat. M. Maggie - Trndsttr (Feather) (Lucian Remix)</li>
  <li>Black Coast Feat. M. Maggie - Trndsttr (Feather) (Lucian Remix)</li>
  <li>Black Coast Feat. M. Maggie - Trndsttr (Feather) (Lucian Remix)</li>
  <li>Black Coast Feat. M. Maggie - Trndsttr (Feather) (Lucian Remix)</li>
  <li>Black Coast Feat. M. Maggie - Trndsttr (Feather) Lucian Remix</li>
  <li>Black Coast Feat. M. Maggie Lucian Remix - Trndsttr (Feather) </li>
  </ol>
  
  <h2>PROBLEM</h2>
  
  <hr>
  
  <p>The expression that I mentioned works perfect for all the filenames except for the cases where the <strong>Feat...</strong> part is grouped inside parenthesis (or brackets, whatever).</p>
  
  <p>Then I tried to adapt the RegEx for the aggrupations condition:</p>
  
  <pre><code>pattern := '^(.+)\s+-\s+(.+?)\s+([\[\(\{])?\s*(ft|feat|featuring([\.])?\s+)((.+)[^\]\)\}])?\s*(.+)?$'
  </code></pre>
  
  <p>But I ended messing my head and missing things, because it also captures the first parenthesis enclosure and the following characters till the end.</p>
  
  <p>I need some help with this.</p>
  
  <h2>Question</h2>
  
  <hr>
  
  <p>How I could fix/improve my expression to treat the mentioned filenames to get the expected results above?.</p>
  
  <p>Or in other words, I need to maintain the "structure" of the expression but adding the capability to capture the <strong>Feat...</strong> part when it is inside parenthesis/brackets to properly format the filename.</p>
  
  <p>PS: Please remember that I'm under pascal-script's RegEx syntax and their limitations (which I'm not sure about them).</p>
  
  <h2>IMPORTANT EDIT:</h2>
  
  <p>I discovered that the author of the software that has this limitations it has support to run an external app from its pascal-script editor, so I can launch a CLI app written in .Net to perform the regex replacement, then I'm now under C#/Vb.Net RegEx motor improvements, nice!.</p>