David Hoyle 62 Posted April 3 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 1081 Posted April 3 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 62 Posted April 3 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 62 Posted April 3 Here are some screenshots from a test (with the same source file open)... Share this post Link to post
dummzeuch 1081 Posted April 3 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 62 Posted April 3 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 464 Posted April 3 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 1081 Posted May 4 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 1081 Posted May 4 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 1081 Posted May 5 In case anybody wants to test it: This problem should be fixed in revision #3843 Share this post Link to post
David Hoyle 62 Posted May 6 Thanks @dummzeuch, I'll try over the weekend when I get some time. 1 Share this post Link to post
David Hoyle 62 Posted Thursday at 05:22 PM @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