Hundreds of Massachusetts residents may have been inadvertently exposed to measles, a highly contagious disease, while visiting two hospitals in Greater Boston last month, state health officials said Tuesday evening. The alert covers anyone who may be showing early symptoms of the disease, which resembles a cold at first, and visited Massachusetts General Hospital in Boston between August 17?23 or MetroWest Medical Center in Framingham on Aug. 23 and 24. Two people infected with measles, who apparently had no connection to each other, went to those hospitals for medical care, said Dr. Alfred DeMaria, an infectious disease specialist at the Massachusetts Department of Public Health.