The high-precision measurements of exoplanet transit light curves that are now available contain information about the planet properties, their orbital parameters, and stellar limb darkening (LD). Recent 3D magneto-hydrodynamical (MHD) simulations of stellar atmospheres have shown that LD depends on the photospheric magnetic field, and hence its precise determination can be used to estimate the field strength. Among existing LD laws, the uses of the simplest ones may lead to biased inferences, whereas the uses of complex laws typically lead to a large degeneracy among the LD parameters. We have developed a novel approach in which we use a complex LD model but with second derivative regularisation during the fitting process. Regularisation controls the complexity of the model appropriately and reduces the degeneracy among LD parameters, thus resulting in precise inferences. The tests on simulated data suggest that our inferences are not only precise but also accurate. This technique is used to re-analyse 43 transit light curves measured by the NASA Kepler and TESS missions. Comparisons of our LD inferences with the corresponding literature values show good agreement, while the precisions of our measurements are better by up to a factor of 2. We find that 1D non-magnetic model atmospheres fail to reproduce the observations while 3D MHD simulations are qualitatively consistent. The LD measurements, together with MHD simulations, confirm that Kepler-17, WASP-18, and KELT-24 have relatively high magnetic fields (>200 G). This study paves the way for estimating the stellar surface magnetic field using the LD measurements.