TSE: Issue: StrFind() ignores the 'i'gnore search option

7 views
Skip to first unread message

knud van eeden

unread,
Oct 15, 2025, 6:34:18 PMOct 15
to SemWare TSE Pro Text Editor, S.E. Mitchell
Hello,

PROC Main()
  STRING s[255] = "f:\4dos"
  Warn( StrFind( "^[a-z]:", s, "x" ) ) // gives 1 as expected
  Warn( StrFind( "^[A-Z]:", s, "ix" ) ) // gives 0 and that is not expected, because of the 'i' (=ignore case) in the search options
 END


Tested and in all the same incorrect result in:
1. TSE for Microsoft Windows version 4.50.RC24
2. TSE for Microsoft Windows version 4.50.13 clean
3. TSE for Linux WSL Ubuntu version 4.50.13 clean
4. TSE for Linux non-WSL Ubuntu version 4.50.13 clean

with friendly greetings
Knud van Eeden

S.E. Mitchell

unread,
Oct 15, 2025, 9:27:10 PMOct 15
to knud van eeden, SemWare TSE Pro Text Editor
This one is somewhat non-obvious.
In essence, the ignore-case option only applies to string literals.
The code does not parse character classes in respect to the ignore-case option.
It might be pretty hard to implement. You'd not only have to take A-Z
into account but hex, octal and decimal constants that can also be
used in character classes.
Reply all
Reply to author
Forward
0 new messages