I have a very large file of source code loaded in Notepad++, and I am trying to use it's regex search capabilities to find all places where a property is used.
I need to find all places where a property DESCR
is set. I tried searching for just .DESCR
without regex, but there are far too many results for me to sift through. I know that the code I am looking for will either be prefaced with %This.
or &
and some variable name, followed by .DESCR =
.
I've tried using RegExr to construct the regex, but it isn't finding the strings I want. I've looked here to try to understand regex more, but I am missing something still.
EDIT: More descriptions
Here are examples of something I would be looking for:
%This.oPosition.DESCR = &DATAREC.Y_BUSINESS_TITLE.Value;
%This.data.DESCR = "";
&data.DESCR = "Analyst";
&oPosition.DESCR = &DATAREC.DESCR.Value;
It should not, however, match on these:
&P_NODE_PIN_DESCR = &NODE_PIN_DESCR;
&qLang.Descr = &sDescr;
I know that I am way off base, but here is what I have tried:
(\%This\.|\&[A-Z]+)\.DESCR =
This doesn't pick up anything.
\%This.|\&(A-Z)+.DESCR
This picks up on %This
but nothing following, and doesn't find anything prefaced by &
.
\%This.\w.DESCR =|\&\w+.DESCR =
It looks like it's working on RegExr, but it doesn't match properly in Notepad++ (It matches on things like &ACCT_DESCR =
)
I'm just not familiar enough with regex to understand what I am missing.