Irregular periods

I've had irregular periods all my life. I'm just 20 now. I've been ttc for almost a year now & believe I've been unsuccessful due to this imbalance. Is there a type of medication that could regulate my periods and in turn helpe to get pregnant?