title: Regex for matching javadoc fragments
body: <p>This <a href="https://stackoverflow.com/questions/689007/search-javadoc-in-eclipse">question</a> got me thinking in a <strong>regex</strong> for matching <em>javadoc</em> comments that include some specified text.</p>
  
  <p>For example, finding all <em>javadoc</em> fragments that include <code>@deprecated</code>:</p>
  
  <pre><code>/**
  * Method1
  * .....
  * @deprecated
  * @return
  */
  </code></pre>
  
  <p>I manage to get to the expression <code>/\*\*.*?@deprecated.*?\*/</code> but this fails in some cases like:</p>
  
  <pre><code>/**
  * Method1
  * .....
  * @return
  */
  public int Method1() { } 
  
  // this method should be @deprecated
  public void Method2() { }    
  
  /**
  * Method3
  * .....
  * @return
  */
  public int Method3() { } 
  </code></pre>
  
  <p>where it matches all the code from the 1st <em>javadoc</em> fragment until the 3rd <em>javadoc</em> fragment.</p>
  
  <p>Can someone give a <strong>regex</strong> for this?</p>