Replace row numbers from copied code

This has nothing to do with SharePoint but I wanted to share the trick. When you copy code from some pages sometimes you have to copy the ugly row numbers, like

1: function XYZ
3:     var a = b;

You can delete these numbers easily with NotePad++ or another higher TextEditor. I use NotePad++ so I'll show you have I do that with NP.

  1. Copy the code into the editor
  2. Open the "Replace" dialog
  3. Check "Regular Expression"
  4. Enter the regular expression in "Find What" = \d*: (This can be any other regex)
  5. Enter nothing into "Replace String"


Popular posts from this blog

SharePoint Web Folders - Create a Desktop Shortcut to a SharePoint library on Windows XP with and without SSL

Ways to redirect http requests in SharePoint

Open SharePoint 2010/2013 Display, Edit, New Forms in Modal Dialogs