Regularised Linear regression is called ridge regression in the stats literature
you can just use whatever code you use to do linear least squares by adding dummy data( see data augmentation) in link below
http://www-stat.stanford.edu/~owen/c...larization.pdf
no need for quadratic programming / stoch descent etc