Hello. Regulars for me - the dark forest. And no matter how much I tried to understand the principle of their actions, nothing happened. In general, you need to make a regular list to delete all attributes of tags except for certain ones. For example, there is a string
$string = '<a href="site.com" height="150" width="30" style="display:block" class="visible">ссылка</a>'; you need to remove all attributes from it except for href one regular schedule. Is it possible? Maybe someone has a ready-made expression for this?