fork download
  1. <?php
  2.  
  3. $text = '@Tript по поводу заказа';
  4. $text = preg_replace('~(?<!\S)@([^\s,.]+)~u', '<a href="https://' . 'domen.ru/$1">$0</a>', $text);
  5. echo $text;
Success #stdin #stdout 0.02s 26404KB
stdin
Standard input is empty
stdout
<a href="https://d...content-available-to-author-only...n.ru/Tript">@Tript</a> по поводу заказа