Can I use the output of an NPN proximity switch as the input to an LM7805 (positive input) voltage regulator? I'm a little confused on PNP vs NPN, but I'm reading as fast as I can. Also I see that they make an LM79xx series of VR's that, I think, accept a negative voltage as the input, would this negative voltage come from an NPN style device? Thanks, Jim G.
You want a PNP type. That type sources current.
If you need to use an existing NPN type you can add a high side switch, but at that point you'd perhaps be be better off using a regulator with an enable input as @Ignatio suggests.
Here is one way to do the former:
The proper choice of R1/R2/Q2 depends on the current you intend to draw from U1.