One indirect solution: There's tools for compressing JavaScript files (minifiers). These strip comments and remove all unnecessary white space, which results in much smaller files. I use YUI Compressor for my JS and CSS files saving to -min.js file names. This might be the better approach in the long run if you're after getting smaller files. The comments can help later when reworking the code so it's good to keep them around for development.
Examples: http://jscompress.com/ http://fmarcia.info/jsmin/test.html http://www.crockford.com/javascript/jsmin.html http://developer.yahoo.com/yui/compressor/ One direct solution: Find: (?s)\/\*.*\*\/\r The (?s) lets the . match newlines. -Kendall On Sunday, September 30, 2012 1:55:26 PM UTC-4, kt wrote: > > Hi > > I've been futzing around with grep for nearly an hour and can't figure out > how to grep multi-line /* ... */ blocks. I have a large Javascript source > file with tons of single and multi line comments and I want to strip them > all out to reduce file size. I got the single line grep working > (\r//[^\r]+) but I'm stumped on the multi line version. Anyone help me out? > > Thanks in advance > > Ken > -- -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>