Been there, done that....but after kids were grown and gone, left a husband with major psych/health issues and a gun obsession, and now with a wonderful man who knew us both well, and was willing to wait until my timing.
I do regret not leaving years ago--it took the 'affair' to bring things to a head and give me the courage to leave. I regret that my witness family sees it and confirms to them how evilly worldly I have become. I waited until my daughter was grown, but she could have had different roll models for how to handle problems in her own marriage.....
There are no black and white/ right or wrong/ clearcut answers. Obviously it would be better if we all just lived happily ever after...but sometimes you settle for less...or gamble everything on another life...