Remove empty lines in Netbeans 7.x , NotePad++ &.. with Regular Expression

You can do this with a regular expression + and a replacement. Do this in an editor window or in the project (or files) directory tree:

  • Ctrl + H
  • Check “Regular Expression”
  • Search for \n\n
  • Replace with \n
  • Click “Replace all” until all lines are deleted

If you want to keep a blank line you should:

  • Search for \n\n\n
  • Replace with \n\n

If you want to replace consecutive lines that are not empty but contain whitespaces only you should:

  • Search for \n[\t\r]+$\n
  • Replace with \n
بیشتر بخوانید:   Framework یا فریم ورک چیست؟

همچنین ببینید

php programing web site developer script

Tips to Optimize Your PHP Script for Better Performance for Developers

If you are a developer, it is essential for you to optimize your script early …

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *