I have several hundred .markdown files that I need to loop through and replace the following multiline strings:
---
---
I currently have the following code:
foreach (glob("*.markdown") as $filename)
{
$file = file_get_contents($filename);
file_put_contents($filename, preg_replace("/regexhere/","replacement",$file));
}
My question is, which regex do I need to remove the multi line strings in every file.
Thanks
preg_replace()?---strings. I need to match and remove only the multiline---because elsewhere in the file I have single---which I need to keephttp://localhost/inforeach (glob("http://localhost/*.markdown")