Confused

How do you know the difference between pregnancy bleeding /"periods" and real periods, I used to think if you got your period you weren't pregnant. More and more recently I've found so many stories about having periods while pregnant ??