fork download
  1. <?php
  2.  
  3. $replyText = "This is a http://s...content-available-to-author-only...e.sit/אבגדהוזחטיכךלמםנןסעפףצץקרשת link.";
  4. $replyText = preg_replace('@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@u', '<a href="$1" target="_blank">$1</a>', $replyText);
  5. echo $replyText;
Success #stdin #stdout 0.02s 23812KB
stdin
Standard input is empty
stdout
This is a <a href="http://s...content-available-to-author-only...e.sit/אבגדהוזחטיכךלמםנןסעפףצץקרשת" target="_blank">http://s...content-available-to-author-only...e.sit/אבגדהוזחטיכךלמםנןסעפףצץקרשת</a> link.