Skip to content

Instantly share code, notes, and snippets.

@cgdecker
Created October 14, 2011 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgdecker/1288226 to your computer and use it in GitHub Desktop.
Save cgdecker/1288226 to your computer and use it in GitHub Desktop.
Some regexes to use for cleaning up useless Javadoc.
Javadoc @param line with the name of the parameter and nothing else... replace with nothing
[ ]*\* @param [a-zA-Z0-9_$]+[ ]*\n
Javadoc @return line with nothing after the @return... replace with nothing
[ ]*\* @return[ ]*\n
Javadoc @throws line with nothing but the exception type after @throws... replace with nothing
[ ]*\* @throws [a-zA-Z0-9_]*[ ]*\n
Javadoc blank line followed by the Javadoc ending line... replace with just the ending line
[ ]*\* \n([ ]*)\*/ --> $1\*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment