Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Easy way to remove all c++ comments from code
Forum Updated to NodeBB v4.3 + New Features

Easy way to remove all c++ comments from code

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 3 Posters 5.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    luca
    wrote on 18 Oct 2011, 08:06 last edited by
    #1

    Hi all,
    I need to give a part of my source code to a customer but I wat to remove all comments from the code:
    @
    //my comment

    /*
    my comment
    */
    @

    Is there a way to do that from QtCreator.

    I'm actually trying with the find function and RegExp. I find all occurrence of:
    @
    //.*
    @
    and I replace with :
    @
    //------------
    @
    This is not so difficult but how can I find the following comment:
    @
    /*
    my comment
    */
    @

    ?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jensen82
      wrote on 18 Oct 2011, 08:32 last edited by
      #2

      You can use Regular Expression in the find-/replace field in QtCreator.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on 18 Oct 2011, 10:27 last edited by
        #3

        "Try this":http://lmgtfy.org/?q=c+++comment+remover

        1 Reply Last reply
        0

        1/3

        18 Oct 2011, 08:06

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved