It's a good question. My answer:
This is a question I've wrestled with quite often.
If I could go back and change some of the things in my past, I could no doubt spare myself--and others--a great deal of pain and regret.
However, I'm not completely convinced that it would be worthwhile to do so.
Aside from the philosophical issue that having a life free from pain is not necessarily a desireable goal, there's the simple matter that the person I am right now is the result of the accumulation of experiences, good and bad, that have shaped and developed me and the way I see the world--and I like the person I am right now.
The parts of my life which have been the most painful--failed relationships, poor decisions--have also been the parts of my life where I have learned the strongest lessons about how to live my life the way I want to live it and how to seek happiness for myself and those i love without doing so at the expense of others. I would not choose to erase those lessons--not for any reason whatsoever, certainly not just to spare myself some pain.
Pain is a part of life. If you never hurt, you never feel. To wish for a life free from pain is to wish not to be alive at all.
The biggest regrets I have are not about times where I've been hurt, but rather about times where I have hurt other people. If I could change the things I have done which have hurt others without losing the value I have gained from those experiences, i might choose to do so, but I doubt it--who am I to judge the lessons those people have learned from those experiences? And is it any more realistic to desire a life where you never cause pain for anyone else, directly or indirectly, than it is to wish for a life free from pain yourself?