My best friend had a miscarriage....

I posted the other day how upset I was that my best friend was pregnant since I have been trying for a few years and have yet to succeed. Today we learned that she had a miscarriage. I want to be there for her but I’m not sure what to say or how to say it...