<?php $str ="test Приходите в наш <a d>test</a> видеочат, бывший когда-то test'м.testa больше нет. Забейте на <h2>test</h3> Труконф test"; echo preg_replace('/(?<!<h\d>)(?<!<a(\s)[.+]>)(test)/', '<$0>', $str);
You have javascript disabled. You will not be able to edit any code.