I have a voltage regulator and UPS battery backup. Putting the voltage regulator first and then the UPS or the UPS and then voltage regulator both work, but what is best?
Most of UPS devices have voltage regulators already integrated. Since you didn't mention which UPS you have, I cannot be certain of this, but I would take a wild guess that yours has it also.
Cheaper voltage regulators are usually worse at their job than UPS is so I would recommend putting it in front of UPS. That way it will make voltage spikes little bit smoother for UPS to handle and make it's life easier.
I recommend this since you already have voltage regulator and I see no drawback in using it that way. Personally, I just plug-in UPS and rely on it's internal voltage regulator.