First, my daughter has ibs & hsa recently been researching the diet (there's a website & chat forum too) & the advice given earlier is not really correct, some dairy you can eat but alot you can't, you should becareful about alot of the carbohydrates eg, rice!!, potato, sweet potato, breads, pasta & also corn.
On the other hand peas, beans, etc are fine as are all sea foods, meats (although not processed meats as in delicatessan stuff) most fruits are fine, although banana causes 2 days worth of foods to come up where my daughter is concerned. She also is constipated definitely does not have diarrhoea.
I had (& many women I know had) a problem re urinating often & with no warning after my first pregnancy but what you're experiencing seems more like an infection, or maybe you just need to do some bowel exercises like with yoga to tighten up strained & therefore weakened bowel muscles??!!