preg_replace('/(@[a-zA-Zа-яА-Я0-9]+?)#(\d+)/', '<a href="/user/$2" class="user-tag">$1</a>', $text);
preg_replace('/(@[a-zA-Zа-яА-Я0-9]+?)#(\d+)/u', '<a href="/user/$2" class="user-tag">$1</a>', $text);
preg_replace('/(@.+?)#(\d+)/', '<a href="/user/$2" class="user-tag">$1</a>', $text);