On Sun, 15 Mar 2020 22:19:21 +0100 Bart via lazarus <[email protected]> wrote:
> On Sun, Mar 15, 2020 at 8:23 PM Mattias Gaertner via lazarus > <[email protected]> wrote: > > > IMO it should check for \[ > > Using \ as an escape character isn't really a good choice IMO, since > this function deals with filenames. So? It is common practice on Unix since decades. > I would be more inclined to have an option to disable sets in the > mask. 1. Without backslashing you need sets for ? and * as well. 2. I guess this function exists only for Delphi compatibility. Regular expression are more versatile anyway. > @Rolf: you can do a StringReplace on the filename, changing '[' into > '[[]'. That would do the trick. > > Let's wait to hear what Delphi does (got no answer yet). I can't find MatchesWindowMask in Delphi 10.3. I found MatchesMask, which works the same. It supports [] too and I can't find any other way than [[]. Mattias -- _______________________________________________ lazarus mailing list [email protected] https://lists.lazarus-ide.org/listinfo/lazarus
