15 Jul 2008

Quick regular expression snippet to convert HTML links to Markdown links:

Find:

<a href=\\"(.*?)\\">(.*?)</a>

Replace:

[$2]($1)

(Try it in TextMate, for example, which has an awesome find/replace dialog that accepts regular expressions.)

Creative Commons LicenseThe HTML links to Markdown article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.

Add Your Comment

Spam Protection by WP-SpamFree

HTML links to Markdown