Remove single line and multiline comments from string Goal

Using the programming language of your choice, write the shortest program to eliminate comments from a string representing a C program.



Input

The string can be taken as any form of input, but it may also be taken as a variable.



Instructions

Two different kinds of comments are to be removed:


multiline comments, starting with /* and ending with */
single line comments, starting with // and ending with Linux-style line breaks (LF, \n)


Comments within strings are not to be deleted. For the purpose of this challenge, you only need to consider "-delimited strings. In particular, you can ignore the possibility of '-delimited character literals. You may also ignore trigraphs and line continuations (/\&lt;LF&gt;*...).



Examples

Input:

#include &lt;stdio.h&gt;

int main(int argc, char** argv)
{
    // this comment will be removed
    if (argc &gt; 1) {
        printf("Too many arguments.\n");   // this too will be removed
        return 1;
    }
    printf("Please vist http://this.will.not.be.removed.com\n");
    printf("/* This will stay */\n");
    printf("\"/* This will stay too */\"\n");
    printf("//and so will this\\");
    // but not this
    printf("just \"ano//ther\" test.");
    return 0;
}


Output:

#include &lt;stdio.h&gt;

int main(int argc, char** argv)
{

    if (argc &gt; 1) {
        printf("Too many arguments.\n");   
        return 1;
    }
    printf("Please vist http://this.will.not.be.removed.com\n");
    printf("/* This will stay */\n");
    printf("\"/* This will stay too */\"\n");
    printf("//and so will this\\");

    printf("just \"ano//ther\" test.");
    return 0;
}




Input:

/*
    this shall disappear
*/
#include &lt;string&gt;
int main(int argc, char** argv)
{
    string foo = ""/*remove that!**/;
    // Remove /* this
    int butNotThis = 42;
    // But do */ remove this
    int bar = 4 /*remove this*/* 3; // but don't remove that 3. */
    return 0;//just a comment
}/*end of the file has been reached.*/


Output:

#include &lt;string&gt;
int main(int argc, char** argv)
{
    string foo = "";

    int butNotThis = 42;

    int bar = 4 * 3; 
    return 0;
}
Shell + coreutils + gcc compiler collection, 31 bytes
This answer may seem a bit loopholey, but I didn't see anything specifically banning it in the question.
Rather than using clumsy regular expressions, why not use the tool that was built for the job.  It should have no problem giving correct results:
cpp -fpreprocessed -o- -|sed 1d

Takes input from STDIN and output to STDOUT.  Normally ccp will do all preprocessing (header files, macro expansion, comment removal, etc), but with the -fpreprocessed option, it will skip most of the steps, but it will still remove comments.  In addition, cpp adds a line like # 1 &quot;&lt;stdin&gt;&quot; to the beginning of the output, so the sed is there to delete it.