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