The present number of galaxies with measured redshifts z greater than or similar to 1 is increasing rapidly, thus allowing for measurements of their correlation function. The correlation function xi(psi, v) is measured in redshift space as a function of the angular separation and velocity difference v. The relation between angle and velocity difference depends on the cosmological model via the factor H(z)D(z), where H(z) is the Hubble parameter and D(z) is the angular diameter distance. Therefore, the cosmological model can be constrained by measuring this factor from the shape of the contours of the xi(psi, v), if the effect of peculiar velocities can be taken into account. Here, we investigate the application of this method to the high-redshift Lymanbreak galaxies. The high bias factor of this galaxy population should suppress peculiar velocity effects, leaving the cosmological distortion as the main contribution to the anisotropy of the correlation function. We estimate the shot noise and cosmic variance errors using linear theory. A held size of at least 0.2 deg(2) is required to distinguish the Einstein-de Sitter model from the flat Lambda = 0.7 model, if 1.25 Lyman-break galaxies are measured per square arcminute. With a held of 1 deg2, the cosmological constant can be measured to similar to 20% accuracy if it is large (greater than or similar to 0.5). Other equations of state for a scalar field can also be constrained.