Anyone can help me answer this

if I take a pregnancy test five weeks after sex can I get a positive or is that to early I have irregular periods also