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

Rate this post

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 nn
  • Replace with n
  • Click “Replace all” until all lines are deleted

If you want to keep a blank line you should:

  • Search for nnn
  • Replace with nn

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

  • Search for n[tr]+$n
  • Replace with n
بیشتر بخوانید:   حذف خط های حاوی یک عبارت خاص Remove lines containing Regular Expressions

Check Also

گروه فنی مهندسی پرهاست ParHost.net

فریم ورک لاراول چیست؟

فریم ورک لاراول چیست؟ – بهترین فریم ورک PHP زمانی که در مورد فریم ورک‌های …

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

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