Advertisement
Guest User

Untitled

a guest
May 24th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. String escapedText = HtmlUtils.htmlEscape("www.youtube.com");
  2.  
  3. return escapedText.replaceAll("(\A|\s)((http|https|ftp|mailto):\S+)(\s|\z)",
  4. "$1<a href="$2">$2</a>$4");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement