title: Regex ignore pattern
body: <p>I have a text with some annotation-marks. brackets '(' and ')' or '[' and ']' are used to determine what is part of the annotation (it´s like in a normal text, like this sentence). i want to perform a regex on it to search something in the input, but... it should ignore all annotations. </p>
  
  <p>the problems are:</p>
  
  <ul>
  <li>they can appear at any place (i don´t know where and how many)</li>
  <li>i can not strip them easily (performing a replace-regex to kill all appearences), because i need to know the indexes and length after performing my search-regex in the original text</li>
  <li>it has to be as fast as possible on a HUGE input-text</li>
  </ul>
  
  <p>the annotations can not be nested, something like "123 (Hello (World))" will not appear. if the annotation-brackets are part of a string (in quotes), they are part of the text and therefore no annotation.</p>
  
  <p>here is an example:</p>
  
  <pre><code>Input Text: "Hello, my (real) name is John. I worked in England (near London) on a real german restaurant.".
  
  Search Regex: "my.*?real"
  
  Output: "my (real) name is John. I worked in England (near London) on a real" (index=7, length=67)
  </code></pre>
  
  <p>what is the best way to solve this?</p>