How can I programmatically get the region_id in Magento from a 2-character state abbreviation? I'm using Magento 1.4.2 if that matters at all.
$regionModel = Mage::getModel('directory/region')->loadByCode($regionCode, $countryCode);
$regionId = $regionModel->getId();