What's a period? OK, perhaps this looks like a question too basic to even answer, but it is rather unavoidable when we are talking about a subject like getting periods in pregnancy. Menstruation occurs when an egg was not fertilized during a monthly cycle, and the uterus cleans itself out to prepare for the next round. Sometimes an egg has been fertilized but has not implanted properly for whatever reason, and menstruation still occurs. This is also called a chemical pregnancy. Pregnancy and periods do not go together. Nobody can get their period and be pregnant, unless, perhaps, they have two uteri, but I think we are moving more into the realm of science fiction here.
Although, on a more serious note, it is in fact scientifically possible to have two uteri, and it does happen to some women. Really. Look it up on the internet. That is some terrible fascinating stuff! But besides that, pregnancy and periods are mutually exclusive. It is, however, possible to experience vaginal bleeding, or early pregnancy spotting and cramping. This can sometimes be confused with menstruation, and is quite common during the first trimester of pregnancy.