What time in your menstrual month are you? You'll only be ovulating for a brief period, and possibly you weren't on those couple of days.
I think it is highly unlikely you would get pregnant from what you describe. While pre ejaculation happens and someone 'might' get pregnant from it, I would think what you describe is improbable. I would not worry. I personally wouldn't take emergency birth control for this (that's the pill to prevent becoming pregnant). If you decide to, you have to take that within 72 hours. After you take it, you'll be irregular for 2 to 3 months most likely as it is a lot of hormones (how it works) and the body has to process that. Know that going in. But pregnancy can't be ruled out 100 percent from this.
With regards to std's, again, best to pitch a condom rather than turn it inside out but this sounds extremely brief. I'd also not be worried about this but it can't be ruled out 100 percent. A doctor would most likely tell you to see if any symptoms develop and if they don't, don't worry. Pre cum is not like ejaculation. Keep that in mind.