I need a php function that will remove and return any references to an excel file within exclamation points. So if I have:
$string = "Blah blah blah, this is a paragraph \n\n
and some more copy. \n\n
!/uploads/excel_doc.xls! \n\n
Blah blah. The end."
I want to have a function like this:
function excel_file($string){
$string = _[_reg ex filter__]___;
return $string;
}
Where $string returned is:
array($original_string, $excel_file_name);
// original string should replace the excel file reference with the string "[excel]"
how about
output: