Exact solutions for an extended nonlinear Schrödinger equation