home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9500 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  812 b 

  1. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!mips!bridge2!patience!div
  2. From: div@NAD.3Com.COM (Dinesh Venkatachalam x5498)
  3. Newsgroups: comp.unix.questions
  4. Subject: Good way to strip K&R Style comments
  5. Message-ID: <1249@bridge2.NSD.3Com.COM>
  6. Date: 28 Jul 92 22:04:48 GMT
  7. Sender: news@bridge2.NSD.3Com.COM
  8. Reply-To: div@NAD.3Com.COM
  9. Organization: 3Com Corp
  10. Lines: 15
  11. Nntp-Posting-Host: patience.nad.3com.com
  12.  
  13.  
  14. I am looking for any way ( using awk, sed, perl, lex ) to strip K&R style
  15. comments.
  16. /* Start of comment till this 
  17.     and on the next line */
  18.  
  19. The comments can span multiple lines, and I want this script to process the
  20. input file and strip out everything including and between the /* and */
  21.  
  22. I would prefer the Regular-expression syntax in lex is such a solution exists
  23.  
  24. Thanks.
  25.  
  26. ...Dinesh
  27.  
  28.