Loading ...
Sorry, an error occurred while loading the content.

Re: search pattern to match C comments?

Expand Messages
  • panshizhu@routon.com
    ... That really helps!, thank... -- Sincerely Pan, Shizhu. ext: 2221
    Message 1 of 3 , Mar 30, 2006
    • 0 Attachment
      Gerald Lai <laige@...> wrote on 2006.03.31 14:59:06:
      > On Fri, 31 Mar 2006, panshizhu@... wrote:
      >
      > > For some reason I need to remove all the comments in my code.
      > >
      > > So I will try to seach for /* ... */ statements.
      > >
      > > I had tried /\/\*\_.*\*\/ but that doesn't work. Any comments? Or if
      > > there's a better approach in match all comments in a C file?
      >
      > How about making the search non-greedy?
      >
      > /\/\*\_.\{-}\*\/\|\/\/.*
      >
      > --
      > Gerald

      That really helps!, thank...

      --
      Sincerely
      Pan, Shizhu. ext: 2221
    Your message has been successfully submitted and would be delivered to recipients shortly.