Remove double empty lines in Visual Studio 2012

  • 1Open the Find & Replace dialog (Ctrl+H)
  • 2Tick 'Use Regular Expressions' and in Find specify:
  • 3^(?([^\r\n])\s)*\r?\n(?([^\r\n])\s)*\r?\n
  • 4In Replace box delete everything
  • 5Click Replace all
  • NVisual Studio 2012 changed it's regex syntax

^*\r?\n

posted @ 2013-05-11 12:03  一只老鼠  阅读(116)  评论(0编辑  收藏  举报