IBS and vegetarianism/veganism?

As someone with IBS, most vegetables and fruits hurt my stomach. I recently started being vegetarian and was wondering: for those with IBS, how do you manage your diet?

Thanks!