I need to replace all block comments with preg_replace() in php. For example:
/**asdfasdf
fasdfasdf*/
echo "hello World\n";
For this:
echo "hello World\n";
I tried some solutions from this site, but no one works for me. My code:
$file = file_get_contents($fileinput);
$file = preg_replace('/\/\*([^\\n]*[\\n]?)*\*\//', '', $file);
echo $file;
My output for example is same as input.Link to my regex test