PHP preg_replace string path given

PHP preg_replace string path given

I have issue with preg_replace function in PHP. I cant figure out a pattern and a replacement.
I have this two strings and some code:
$dirname1 = ‘hdadas/dasdad/dasd/period_1min’;
$dirname2 = … Read more