On Tue, Oct 19, 2021 at 10:44 AM José Mejuto via lazarus <lazarus@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 -- _______________________________________________ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus