(?s)\s|/\*.*?\*/
I've tested with ColdFusion 8 and Railo 3.3.
sCSSContent= sCCSContent.ReplaceAll( "(?s)\s|/\*.*?\*/" , "" );
/* Test 1 */
/* Test * / * 2 */
/* Test
. test
. test
test 3
*/
/* Test * / * 4 */ width: 0; /* Test 5 *//**/
/* Test 6 /*/
You made me think about the problem differently, which led to http://stackoverflow.com/questions/2503413/regular-expression-stop-at-first-match
I changed the RegEx block in question to
.*?
. This seems to pass my all of my tests so far.