I've been having brown stringy discharge 2 weeks before and after my period. Is this an infection?

Brown Vaginal Discha. This does not sound like an infection but more like retained clots and may be a sign of dysmenorrhea or menometorrrhagia. There are many potiential causes for this that should be evaluated with a history, physical, laboratory and diagnostic studies.