oven not working

my oven will not light without help. pilot is on but no gas. if i reach in and flip the "shut-off" on the regulator and then reopen it will light but as soon as temp is reached in the oven the flame goes away and will not relight until i close and open regulator again. is the regulator bad? or is it something else?