How does the body regulate the stomach ph?

Keeps it Acid. The stomach cells keep producing hydrochloric acid (hcl) to keep the ph about 2-3. When you eat food, the vagus nerve triggers the stomach cells to secrete more acid. Some medications break down the normal protective barrier (aspirin, tobacco, steroids). When ulcers form, then doctors sometimes use other medicine to cut down on acid production to allow the ulcer to heal.