Format URLs in string to HTML Links in C#

/ Published in: C#
Save to your folder(s)

Will return a string that has any matched URLs wrapped in `<a>` tags.

Example: `"This is a link to . Please visit !"`

Becomes: `"This is a link to <a href=''></a> . Please visit!"`

Note: Opens links in new window.

Credit for regex:
[Faraz Shah Khan]( "Credit")

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.