title: Extract multiline output if consist certain word AND inside a bracket
body: <p>I have an input of such:</p>
  
  <pre><code>Jun 29 16:46:13 iPhone SomeThing[79987] &lt;Notice&gt;: [AppName] file.x:115 DEBUG: ClassNumberOne viewControllers: (
      "&lt;UINavigationController: 0x105031a00&gt;",
      "&lt;UINavigationController: 0x10505ba00&gt;",
      "&lt;UINavigationController: 0x10486fe00&gt;",
      "&lt;UINavigationController: 0x105052600&gt;",
      "&lt;UINavigationController: 0x105065c00&gt;"
  )
  Jun 29 16:46:13 iPhone SomeThing[79987] &lt;Notice&gt;: [AppName] file.x:151 DEBUG: ClassNumberTwo ARG2 2
  </code></pre>
  
  <p>There's two case to be matched here, one is of multi-line, another is of single line. The criteria is that it must have the <code>DEBUG:</code> keyword. For multiline, if that line has the keyword and and a <code>(</code>, then it should match until the end of <code>)</code>. Each line is separated by a newline separator. I can't figure this out. Currently I'm using a simple <code>grep DEBUG:</code> and that's it. But for the multi-line scenario, everything is lost beside the first one. And I'm not familiar with <code>perl</code>, any idea? Thanks in advance!</p>
  
  <p>Note that I'm on iOS (jailbroken), thus another tool might be limited.</p>
  
  <p>EDIT:</p>
  
  <p>Expected output will be the whole line that matched the criteria, that's the same as the input example shown above. The actual input have tonnes of other lines that doesn't have the keyword <code>DEBUG:</code>, and thus will be ignored.</p>