I own a 2004 Sonata V6 for two years now, a friend has a 2003 Regal (same car as the 2004).
Both are quite similar in looks and performance, unless the Regal has a turbocharger, and in that case, I'd skip that car for too much extra maintainents, and unless you could verify that the Sonata has had the timing belt replaced in the last 30k miles or so, I'd skip that car for that reason. The Buick has a timing chain, not a belt. Also, if the Regal's intake manifold gasket hasn't been done in a while, that's around the corner too.
I bought the Sonata with 105k on it and knew it need some work done on it, which I do all the repairs at home.
The 2.7 Sonata engine & transmission, along with the Regal's 3.8 engine & transmission are both good & reliable. Even though the Buick has a larger engine, it will get somewhat better gas mileage than the Sonata.
Drive-train, steering & suspension parts are readily available and reasonably priced for both cars.
And at this age, both cars should be thoroughly inspected for steering & suspension wear & tear, including all the bushings and links, along with the brakes.
If you can't or don't want to do a good inspection, pay an independent mechanic to do so. The $100 or so spent can possibly save you many many times that in hidden, unknown repairs.
I drive my Sonata 65 miles to & from work daily, and it's as nice as anything else in the same class. See which one fits you best.