Posted By

daisuke103 on 04/28/09


Tagged

url php textmate replace a ereg str href


Versions (?)

PHP 正規表現 URLを自動的にリンクにする


 / Published in: Other
 

  1. $str = ereg_replace("(https?|ftp)(://[[:alnum:]+$;?.%,!#~*/:@&=_-]+)", "<a href="\1\2" target="_blank">\1\2</a>" , $str);

Report this snippet  

You need to login to post a comment.