Added a generic regions enumeration function.