David Hoyle 68 Posted April 3, 2022 For some time I found that Grep, when regular expressions are enabled, is always case sensitive, regardless of the case-sensitive setting in the search dialogue. I was going to try and trace the issue but I cannot build GExperts (see other posts). Looking at the code it should support non-case-sensitivity searches. Share this post Link to post
dummzeuch 1505 Posted April 3, 2022 2 hours ago, David Hoyle said: Looking at the code it should support non-case-sensitivity searches. It should, and it does, at least in my test in Delphi 2007: Seaching for "Then", whole word, not case sensitive as a regular expression, found several instances of "then": Have you got an example where it doesn't work? And in which Delphi version does it fail? 10.4 ? 11.1 ? Share this post Link to post
David Hoyle 68 Posted April 3, 2022 In 10.4.2 unfortunately it does not. For instance, searching for "ixt\w*" should find "IXTRelationshipFloat" however all it finds in my project group is "ixture" as part of "TestFixture". To find the interface I need to capitalise "IXT\w*". Share this post Link to post
David Hoyle 68 Posted April 3, 2022 Here are some screenshots from a test (with the same source file open)... Share this post Link to post
dummzeuch 1505 Posted April 3, 2022 OK, I can reproduce that one with Delphi 10.4 but not with Delphi 2007. This might therefore be some kind of Unicode issue, even though I can't figure out how. btw: It also happens with a much simpler regex: "ix" is enough. If you can fix it, I'll gladly accept a patch of course. If you can't, please create a bug report and include these screenshots. Share this post Link to post
David Hoyle 68 Posted April 3, 2022 It's a problem with the SynEdit components suite. I've done some tests with the version of code you have in GExperts and the problem seems within the SynRegExpr unit. I've also opened up an old editor that uses SynEdit\SynEdit from GitHub which has the extract same SynRegExpr file and regex searches are case-sensitive. The TurboPack\SynEdit code works as expected (searches without case sensitivity) but that codebase no longer uses SynRegExpr.pas (guessing but I expect it uses the RTL code for regexs). Share this post Link to post
pyscripter 689 Posted April 3, 2022 4 hours ago, David Hoyle said: guessing but I expect it uses the RTL code for regex indeed. Share this post Link to post
dummzeuch 1505 Posted May 4, 2022 The current RegExpr unit on GitHub fixes that problem, but unfortunately it no longer compiles with pre UNICODE Delphis because somebody added a {$define Unicode} to it two years ago. Share this post Link to post
dummzeuch 1505 Posted May 4, 2022 Wow, that's great support from Alex-T over on GitHub. He is currently helping me to fix those pesky compile problems, so I will be able to update SynRegExp with the original RegExpr unit. 1 Share this post Link to post
dummzeuch 1505 Posted May 5, 2022 In case anybody wants to test it: This problem should be fixed in revision #3843 Share this post Link to post
David Hoyle 68 Posted May 6, 2022 Thanks @dummzeuch, I'll try over the weekend when I get some time. 1 Share this post Link to post
David Hoyle 68 Posted May 12, 2022 @dummzeuch I can confirm that this issue is resolved with the latest source and I can now perform case-insensitive searches with regular expressions. 1 Share this post Link to post
MJBComp 2 Posted June 13, 2022 (edited) I am experiencing the same thing. I currently have Version 1.3.21 build 3833 experimental installed. Where can i download revision #3843? Edited June 13, 2022 by MJBComp Share this post Link to post
dummzeuch 1505 Posted June 13, 2022 8 hours ago, MJBComp said: Where can i download revision #3843? You can't. But you can compile your own GExperts DLL and replace the one in your installation. Share this post Link to post
MJBComp 2 Posted June 14, 2022 (edited) Got it installed and solved the case-sensitivity search issue. Thank you. Edited June 14, 2022 by MJBComp Share this post Link to post