Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 28th, 2012  |  syntax: None  |  size: 0.69 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Please explain regex that finds css comments
  2. /*[^*]**+([^/*][^*]**+)*/
  3.        
  4. /*.**/
  5.        
  6. +([^/*][^*]**+)*
  7.        
  8. /    <- an escaped '/', matches '/'
  9. *    <- an escaped '*', matches '*'
  10. [^*]* <- a negated character class with quantifier, matches anything but '*' zero or more times
  11. *+   <- an escaped '*' with quantifier, matches '*' once or more
  12. (     <- beginning of group
  13. [^/*] <- negated character class, matches anything but '/' or '*' once
  14. [^*]* <- negated character class with quantifier, matches anything but '*' zero or more times
  15. *+   <- escaped '*' with quantifier, matches '*' once or more
  16. )*    <- end of group with quantifier, matches group zero or more times
  17. /    <- an escaped '/', matches '/'