Skip to content

Instantly share code, notes, and snippets.

@x9t9
Created February 9, 2017 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x9t9/6c3266e3d55970ef4c72cdb5d065616f to your computer and use it in GitHub Desktop.
Save x9t9/6c3266e3d55970ef4c72cdb5d065616f to your computer and use it in GitHub Desktop.
Notepad ++ wrap URI with link markup <a>
// with search nad replace (regular expression )
// @see http://stackoverflow.com/questions/35222560/how-to-wrap-links-in-a-with-notepad-find-replace-function
// @see also http://stackoverflow.com/questions/13673892/notepad-add-link-html-to-beginning-end-of-every-line-using-regular-expressio
//Find
[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?(\?([-a-zA-Z0-9@:%_\+.~#?&//=]+)|)
//Replace with
<a href="$&">$&</a>
//...Or replace with
<a href="$0">$0</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment