I find word 'water' in 55 files.
How do I erase all lines which contain word 'water' in all 55 files?
How do i erase all line if i find certain text?
OK, it occurred to me what the difference is between the two proposed regular expressions.
^.*water.*$
This one will only match the _contents_ of lines containing the word water and replacing those with nothing will _clear_ those lines, not delete them. You will be left with _empty_ lines where a match was found.
.*water.*[\r\n]+
This one, on the other hand may also include empty lines _after_ each line that contains the word water, because "any number of consecutive newline characters, with at least one" will be accepted.
I don't know how to include only one single newline character that could be _either_ \r _or_ \n _or_ \r\n.
^.*water.*$
This one will only match the _contents_ of lines containing the word water and replacing those with nothing will _clear_ those lines, not delete them. You will be left with _empty_ lines where a match was found.
.*water.*[\r\n]+
This one, on the other hand may also include empty lines _after_ each line that contains the word water, because "any number of consecutive newline characters, with at least one" will be accepted.
I don't know how to include only one single newline character that could be _either_ \r _or_ \n _or_ \r\n.