I still don't understand how regular expression work with preg_replace. I have some url in text:
preg_replace(" 'no_mater_what_1'.php'no_mater_what_2' " , 'no_mater_what_1'/ , $some_var);
But why not simply do this:
$replace = explode('.php',$some_var); $replace = $replace . '/';
Because that I find it necessary to use a regular expression, because ".php" is not repeated in the string.