IBS or
irritable bowel syndrome is recurrent abdominal pain/discomfort for atleast three days /month in last three monhs with two of the following symptoms:
pain which improves with defecation
onset associated with change in frequency of stool
onset associated with change in appearance of stool
so , going by your history, u fit into the diagnosis of IBS
first of all , try to guess and avoid the precipitants which in most cases is found to be coffee, cabbage , legumes, excessive fructose, artificial sweeteners.
Rely heavily on stool-bulking agents such as high-fibre diet such as bran , consume more of fruits and vegetables.
If you are suffering from
flatulence , try to eat slowly and avoid carbonated beverages.
if
diarrhea is severe , take
loperamide,2-4mg every 4-6 hrs upto maximum of 12g/day
For pain,
dicyclomine is the preferred drug.
Hope this helps.
Get well soon!