In this paper, we study a class of cubic–quartic NLSE with the Kerr law nonlinearity via a new sub-equation method. Considered method of undetermined coefficients is applied to obtain the introduced solutions. The outcomes are useful in describing the diffusion of optical solitons. The performance of the approach is reliable, useful and gives more new general exact solutions than the other methods.