gunitinug wrote: ↑03 Dec 2017 19:05
But what about
as an attempt to filter out blank lines?
If there is an empty search string is given the seacrh result depends on the programmers choice and could be one of the following two cases:
1) No line matches.
This is the default (recommended) result for literal search algorithms, because on an empty search string is a meta character.
Using meta characters should be avoided by literal camparison tools, so an empty search string is interpreted as "i don't wanna search".
2) Every line matches.
If the programmer of a such a tool (like find.exe) want to allow searching for an empty string, then you should note that
every line contains an infinite amount of empty strings.
Let ε be defined as "" (empty string), then the following string examples are equal to each other:
- "abcde"
- "εabcde"
- "aεbcde"
- "abεcde"
- "abcεde"
- "abcdεe"
- "abcdeε"
- "εaεbεcεdεeε"
- "εεεεεεabcde"
- "abcdeεεεεεεεεεεεεε"
- ...
No matter how the programmer has implemented this detail, you won't get what you wanted.
penpen