Complex sentence: It exits the pelvic cavity through the greater sciatic foramen to enter the gluteal region where it curves around the sacrospinous ligament to enter the perineum through the lesser sciatic foramen.
Split into simpler sentences: It exits the pelvic cavity through the greater sciatic foramen to enter the gluteal region. It then curves around the sacrospinous ligament to enter the perineum through the lesser sciatic foramen.