Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/";
- $text = $this->utility->safe($action['value']);
- if(preg_match($reg_exUrl, $text, $url)) {
- echo preg_replace($reg_exUrl, "<a href="{$url[0]}">{$url[0]}</a> ", $text);
- } else {
- echo $text;
- }
- ?>
Add Comment
Please, Sign In to add comment