Quadratic algebras, Yang-Baxter equation, and Artin-Schelter regularity