s#/\*[^*]*\*+([^/*][^*]*\*+)*/|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#defined $2 ? $2 : ""#gse; #### /* I have good commenting style */ i = 1; /* And I comment every line of code */ i++; /* Even if it's pointless */ j = i; j++; #### i = 1; i++; j = i; j++; #### i = 1; i++; j = i; j++; #### s#/\*[^*]*\*+([^/*][^*]*\*+)*/\n|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#defined $2 ? $2 : ""#gse; #### void function foo(void) { /*Indented comment*/ i = 1; } #### void function foo(void) { i = 1; } #### /*This is a bogus function*/ void function foo(void) /*My function is the best*/ { int i; /*i is an integer*/ int j; /*j is also an integer*/ /*Now I'm going to set i to 1*/ i = 1; /*Also j*/ j = 1; /*Here's some incrementing!*/ i++; /*And more!*/ j++; /*The end!*/} #### void function foo(void) { int i; int j; i = 1; j = 1; i++; j++; }