Three of my exes came to my wedding. I've been to two of my exes weddings as well. My husband is totally unfazed and has always got on with anyone I'm friends with, regardless if we used to date or not. I'm still good friends with one ex and keep in touch with the other couple now and again.
There are some exes I definitely don't have a friendship with though! Ones where either it ended badly, or where it didn't necessarily but we really loved each other (before it went wrong) and establishing a friendship wasn't possible. Much easier to be friends if it wasn't a very serious relationship!