I am having difficulty trying to get this regex to work. All I am trying to do is remove block comments. This is what I have so far but I can't get rid of the final */
.
$string = 'this is a test /*asdfa */ ok then';
$pattern = '/\/\*([^\*\/]*)/i';
$replacement = '';
echo preg_replace($pattern, $replacement, $string);
//this is a test */ ok then
Any help will be appreciated.