A gas regulator is a mechanical device designed to maintain a constant output pressure of gas, regardless of variations in supply pressure or downstream demand. It acts as a safeguard that adjusts the flow of gas to ensure that it remains within the safe operating limits specified by equipment manufacturers and applicable regulations.