I see what the test in line 2 does, but I don't see how the line fits into what I want to be tested. But never mind; it made me think; I now use
rem Show if name has lower-case -
rem echo %%i | MTR -c- -o - [a-z]
echo %%i | MTR -c- -o - "([^a-z]*[a-z].*)" = "Lower case present in \1"
In that, MTR is 32-bit MiniTrue; a sort of combination of LIST, SED, AWK, and suchlike. in the commented-our code line, the echoed one-line text is tested, line by line, for the presence of a lower-case character, and any line containing such is output. The active line, working but not necessarily yet perfected, edits the output line.
MiniTrue is moderately large; but it is wanted for other tests within the files, and presumably will be in a RAM buffer for the duration of the batch file.
> (line 2 is wrapped)
No; your Line 2 was transmitted unwrapped. A displaying agent, including the sender's, may choose to wrap or truncate lines which are too long for the current width of its display element. (IIRC, that was a hardware setting on the glorious DEC VT100 terminal.)
--
SL