We study the influence of disorder and lattice pinning on the dynamics of a charged stripe. Starting from a phenomenological model of a discrete quantum string, we determine the phase diagram for this system. Three regimes are identified, the free phase, the flat phase pinned by the lattice, and the disorder pinned phase. In the absence of impurities, the system can be mapped onto a 1D array of Josephson junctions. The results are compared with measurements on nickelates and cuprates and a good qualitative agreement is found between our results and the experimental data.