Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
<?
$mask="#MARK1#";
$text="....текст...#MARK1# #MARK1# #MARK1#....текст...
....текст...#MARK1# #MARK1# #MARK1#....текст...
....текст...#MARK1# #MARK1# #MARK1#....текст...";
$mask=str_replace("#","\\#",$mask); //подслешиваем решетки
$out=preg_replace("/(".$mask."[ ]*)(".$mask."[ ]*)+/",$mask,$text);
$out=str_replace("\\#","#",$out); //удаляем добавленые слеши
print $out;
?>
....текст...#MARK1#....текст...
....текст...#MARK1#....текст...
....текст...#MARK1#....текст...