Regular algebra and finite machines