What’s the best way to extract the State code from all types of addresses?

I’m trying to figure out how to extract the State code from any type of address.

“123 Sunny Dr., Los Angeles, CA 90210, US”
“123 Sunny Lane, Unit B, Los Angeles, CA 90210, USA”
“123 Sunny Ct, Hollywood, CA, USA”
“Los Angeles, CA, US”

For any of these, I would just like the return value to be “CA”