Weakly nonlinear theory of regular meanders