[Lazarus] TMask revisited
Bart
bartjunk64 at gmail.com
Sat Oct 23 22:56:29 CEST 2021
On Tue, Oct 19, 2021 at 10:44 AM José Mejuto via lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> With "eMaskOpcodeRange" and "eMaskOpcodeOptionalChar" enabled to match
> "a" or "-" or "z" the "-" must be escaped (something like regex) using
> the escapechar, by default "\", in this way "[a\-z]".
That does not seem to work (at least not as I expected):
Opcodes: [eMaskOpcodeRange, eMaskOpcodeOptionalChar, eMaskOpcodeEscapeChar]
Mask: [a\-z] // since '-' is escaped should match 'a', '-' or 'z'
Matches Filenames 'a', 'b', 'c' ,'d' .. 'z', but not '-'
Opcodes: [eMaskOpcodeRange, eMaskOpcodeOptionalChar, eMaskOpcodeEscapeChar]
Mask: [a\-] //should match either 'a' or '-'
EMaskError: Missing closing character "]" in mask (offset 5).
Opcodes: [eMaskOpcodeOptionalChar, eMaskOpcodeEscapeChar]
Mask: [a\-] //should match either 'a' or '-'
Matches Filenames: 'a', '\' and '-'
Q: eMaskOpcodeEscapeChar only treats '\' as escape char is
eMaskOpcodeRange is enabled?
--
Bart
More information about the lazarus
mailing list