title: Sed to replace multiline Java comment with another text
body: <p>I have some java code:</p>
  
  <pre><code>/**
   * Some comment.
   */
  void someFunction();
  
  /**
   * Some comment.
   */
  void anotherFunction();
  </code></pre>
  
  <p>How to write a single line <code>sed</code> to convert the above into</p>
  
  <pre><code>@Override
  void someFunction();
  
  @Override
  void anotherFunction();
  </code></pre>
  
  <p>The best I could do is to just delete the comments with</p>
  
  <pre><code>sed '/\/\*\*/,/\*\// d'
  </code></pre>
  
  <p>and manually insert <code>@Override</code>.</p>
  
  <p>EDIT: The method signature is not always void().</p>