<?php $comment = "@name kdfjd @@ fkjd as@name @ lkjlkj @name"; var_export( preg_replace( '/(?<=^| )@([^@ ]+)/', '<a href="/$1">@$1</a>', $comment ) );
You have javascript disabled. You will not be able to edit any code.