Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7403385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:04:09+00:00 2026-05-29T05:04:09+00:00

Is there any tool / Eclipse plugin that can remove all JavaDoc comments in

  • 0

Is there any tool / Eclipse plugin that can remove all JavaDoc comments in a file?

The normal (non-JavaDoc) comments should be intact after running the tool.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:04:10+00:00Added an answer on May 29, 2026 at 5:04 am

    Try this regex to search replace either in eclipse / sed / your favorite editor that has regex support.

    /\*\*(?s:(?!\*/).)*\*/
    
    • ?s treat input as single line
    • a starting string \**
    • zero or more
      • negative lookahead for */
      • space or non space char
    • a trailing string */

    Edit

    To tackle cases where strings containing javadoc, use this regex

    ((?<!\\)"([^"]|(?<=\\)")*")|(/\*\*(?s:(?!\*/).)*\*/)
    

    and replace it with first capture group

    /1
    

    Then if you say this shouldn’t match

    ///** */
    

    or more complex cases

    I suggest, using a parser tool like antlr to parse using java grammar for tokens like comments and strings and remove elements that you don’t want


    Sometime I find my own regex answers cryptic !!

    So here is some visual feedback

    ((?!\\)"([^"]|(?=\\)")*")|(/\*\*(?:(?!\*/).)*\*/)
    

    Regular expression visualization

    Debuggex Demo


    /\*\*(?:(?!\*/).)*\*/
    

    Regular expression visualization

    Debuggex Demo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any tool that can read a WSDL file and based on the
Is there any tool that can parse a valid C program and generate a
Is there any tool or plugin can do this? CodeBlock has this neat tool
Is there any Eclipse plugin that will allow me to do a Visual Studio
Is there any tool that can warn me against the following sort of code:
Is there any tool that enables you to hot swap JavaScript contents while executing
Is there any tool that lists which and when some classes are effectively used
Is there any tool on the market that supports making games for mobile devices
Is there any tool that will allow me to browse databases on my Android
Is there a good tool that can help to reverse engineer Java classes to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.