If I understand things correctly, “as string as lowercase” allows me to check a string regardless of case by converting it to lowercase before doing the comparison. Is this correct?
If so. here is my Issue:
Text file line I am looking for: “Foo_As_Bar = xxx” or Foo_as_Bar = xxx" (The “as” may be in either case in the file)
Text in file: "Foo_As_Bar"
Q: lines whose ( it as string as lowercase contains “Foo_As_Bar” ) of file "C:\temp\text.txt"
A: empty result
Text in file: "Foo_as_Bar"
Q: lines whose ( it as string as lowercase contains “Foo_as_Bar” ) of file "C:\temp\text.txt"
A: empty result
Text in file: "Foo_As_Bar"
Q: lines whose ( it as string contains “Foo_As_Bar” ) of file "C:\temp\text.txt"
A: “Foo_As_Bar = xxx”
Text in file: "Foo_as_Bar"
Q: lines whose ( it as string contains “Foo_as_Bar” ) of file "C:\temp\text.txt"
A: “Foo_as_Bar = xxx”
Just to expand on that, “as lowercase” is not some kind of special directive on the comparison; it’s just taking the string and changing it to a lowercase form. When we use this to perform case-insensitive comparisons, we have to convert both sides of the comparison operation (or enter our literal string in the correct lowercase).
Comparing two strings in mixed-case results in a False
Q: lines of file "C:\Users\me\Desktop\ExampleLog.log" as lowercase
A: 2024-11-22 10:15:18,229 [17] debug devicehandler [-1] - device state set to idle with data not available
A: 2024-11-22 11:09:55,433 [15] info servicemain - received time changed system event from windows so cached time zone data has been cleared
A: 2024-11-22 11:12:09,525 [31] trace logcontextmessagehandler [d6b53153-8574-b226-c1128fc14a84] - using log context = {path components = [], name components = []}
A: stx=yes&lineitem=processing...
Q: lines whose (it contains "trace" as lowercase) of lines of file "C:\Users\me\Desktop\ExampleLog.log" as lowercase
E: The operator "lines" is not defined.
No, it’s that you’re basically retrieving “lines of lines of file” instead of “lines of file”. You need to just move your filter and only reference lines whose (it as lowercase ...) of file