Consipation

So I have been constipated on and off during the last 2 months. I think it has something to do with my cycle. Before last month I went 2-3 times a day. Sometimes more. But all of a sudden I have been going once or twice if I am lucky. I was wondering if anybody eats certain things at different times in their cycle to keep them regular? Or in general what do you eat to stay regular?