I'm writing my own minifying tool for practice (regular expresssions practice), but after a few tutorials I'm still not getting it.
For example I'm trying to find and remove all comments from my CSS file and that includes:
Single line comments as in
/** single line comment ****/ or
/****single line comment */ and
Multi line comments as in
/**** start of comment
.myCssClass
{
font:13pt Arial;}
********* end of comment **/
So far I'm using an expression which can only deal with single line comments as follows
(\/\*.*\*\/)
But what I'm trying to understand about regular expressions is how do I tell the regex engine to span lines as well. I did try this:
(\/\*[.\n]*\*\/)
which doesn't work at all.
Anyone know where I'm going wrong?
Thanks, Jacques