The documentation for the Pattern Library seems rather skimpy... is there a
good site or place to go for details on how to use it?
Here's something I'm trying to do. I wanted a find/replace like this:
I don't care what's on the other side of the equal sign, I just want to
flash a warning if someone is using a literal empty string instead of
This didn't work as I expected. It found something, but didn't find any of
the examples I was looking right at.
So I looked around and found some examples, and ended up adding a "place
holder" (which was really confusing and not well documented) with a name of
'var' and a meaning of 'identifier', and changed the search/replace patterns
$var$ = "";
$var$ = string.Empty;
It still didn't find the examples I was looking at in the code, so I changed
it to this:
string $var$ = "";
string $var$ = string.Empty;
And NOW it finds the examples I'm looking at, but won't find the instances
it previously found.
How do I create a "pattern" that just finds an assignment to a string
variable (whether in a declaration or not) of a literal empty string? I
cannot figure this out, and it seems like it should be so simple.