You are not logged in.
Pages: 1
Test code:
IsMatch('ab*.[ef]xyz', 'ab.exyz', True);
IsMatch('ab*.[ef]xyz', 'abcd.exyz', True);
IsMatch('ab*.[ef]xyz', 'ab.fxyz', True);
IsMatch('ab*.[ef]xyz', 'abcd.fxyz', True);
all failed!
mORMot version: 1.18.4332.
Compiler: Delphi 2007.
Last edited by zed (2018-02-22 19:37:16)
Offline
Did you find out why?
Also the following fails:
Check(IsMatch('ab.[ef]xyz', 'ab.exyz', True));
Check(IsMatch('ab[ef]xyz', 'abexyz',true));
But this one works:
Check(IsMatch('ab[ef]xyz', 'abexyz',false));
Offline
Please check https://synopse.info/fossil/info/c35f1ecda7
Offline
Yes, it helps.
But here is a new fail:
Assert(not IsMatch('ab[cd]e', 'abdde', False)); // ok
Assert(not IsMatch('ab[cd]ex', 'abddex', False)); // ok
Assert(not IsMatch('ab*.[cd]e', 'ab.dde', False)); // ok
Assert(not IsMatch('ab*.[cd]ex', 'ab.ddex', False)); // fail
Offline
Another one....
Please check https://synopse.info/fossil/info/f27ae4bd52
Thanks a lot for the feedback!
Offline
Ok, now it's work. Thank you!
Last edited by zed (2018-02-23 21:52:25)
Offline
This sounds like a simplified regular expression, cool! And I didn't know about it before.
PS, not a real issue, but I couldn't resist - I thought it should be placed in SynCommon.pas instead?
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Yeah, SynCommons is a better place
Offline
It was in SynCommons.pas but the file is so big it became more than 65535 lines... which makes the Delphi compiler fails... Delphi 5 compiler, but to be honnest...
Check the explanation at the beginning of SynTable.pas.
Offline
Online
+1 for splitting SynCommons
Offline
I didn't take into account the unit file size when I was thinking about it, just thought about it logically
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Pages: 1