Posted By

mikegreen on 07/05/08


Tagged

regex css javascript ruby


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

vali29
Tyster


Match CSS and JS Comments


 / Published in: Regular Expression
 

Matches CSS-style comments spanning one or multiple lines

  1. # This is how it would look using the Ruby Regexp class
  2.  
  3. # Only match one-line comments
  4. Regexp.new(/\/\*.*?\*\//)
  5.  
  6. # Match single and multi-line comments
  7. Regexp.new(/\/\*.*?\*\//m)

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: IdaWallace on November 23, 2018

Thank you so much for providing here coding for Match CSS and JS comments spanning one or multiple lines. Very helpful coding for also IT learners.

Ida, Marketing assignment writer - http://www.assignmenthelpfolks.com/marketing/, also assist IT students at Assignment Help Folks in Australia.

Posted By: Tyagi23 on January 4, 2019

Last night I was in the quest for one of the best portal which will let you fix connections to bluetooth audio devices in windows 10 which is known to be upgraded feature of windows 10 and also here you will be able to find out all advantageous information.

You need to login to post a comment.