GExperts: searching for case-insensitive “T*List.Create” but not “TStringList.Create”
Posted by jpluimers on 2019/05/02
Just learned that partial exclusion can be done with the case-insensitive GExperts Grep Search like this:
T[^s][^t][^r][^i][^n][^g].*List.*\.Create
This will skip TStringList.Create
, but matches TMyList.Create
.
I’d rather have done something like this, but the Delphi RegEx does not support negative lookbehind:
^ *[a-zA-Z0-9_]* *: *T(<!string)[a-zA-Z0-9_]*ListO? *;$
So the alternative is to search for this:
^ *[a-zA-Z0-9_]* *: *T[a-zA-Z0-9_]*ListO? *;$
then exclude all the case insensitive TStringList
entries from it, however GExperts did not support that at the time of writing.
This is an intermediate that works for some of the times:
^ *[a-zA-Z0-9_]* *: *T[^s][^t][^r][^i][^n][^g][a-zA-Z0-9_]*ListO? *;$
–jeroen
^ *[a-zA-Z0-9_]* *: *T[^s][^t][^r][^i][^n][^g][a-zA-Z0-9_]*ListO? *$;
^ *[a-zA-Z0-9_]*: .T[a-zA-Z0-9_]*ListO? *;$;
^ *[a-zA-Z0-9_]* *: *T(?!string)[a-zA-Z0-9_]*ListO? *;$
Leave a Reply