Answer the question
In order to leave comments, you need to log in
How to remove blank lines from a text file?
Given
Text file with many lines
There are lines with text and empty lines
Empty lines contain tabs (tab) (\t)
Lines with text also contain tabs
How to delete lines with tabs (or without them) in which there is no text
Answer the question
In order to leave comments, you need to log in
it is not clear where this code comes from, but the submit_url variable is written in the code, but it is not clear where it is applied
\n\t+\n
Here is a regular expression that will find empty strings.
What to do next with them is up to you, your task is not clear from the tags.
If the question is about programming, then it should be solved accordingly.
And for everyday use:findstr /v "^\s?[\r\n]+$" file.txt
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question