let v = "<script>\n console.log('test');\n</script>";console.log(v.replace(/\s+console\.log\(.*\);?/, ''));
Standard input is empty
<script> </script>
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!