Digital Sanctum

Personal blog of Shane Witbeck Tags · Archive · About

Convert Plain Text Links to HREF Using Regular Expressions

Published: 16 Jul 2009

For a project I was working on recently I had snippets of plain text with links embedded but without the actual HTML code. Here’s some code to get the job done:

Tags: #how-to#regex