Attention: I'm not a teacher.
There are some more definitions and a few examples which would help you to understand the difference between usage of “with” and “by” after the “pregnant”.
pregnant adj. carrying developing offspring within the body
Maria was pregnant with her second child.
I didn't mean to get her pregnant (=make her pregnant).
She is with child by John.
to knock s.o up
to make pregnant
to make s.o pregnant
PAMELA is now pregnant .
She was pregnant with Maisie when she filmed the scene and found it very disturbing to have to….
And how she only got the part because first choice Meg Ryan was pregnant .
Catherine Zeta Jones is the token buxom wench, pregnant by our Chris.
Fergie was five months pregnant with her second daughter, Eugenie.
Andrew was away at sea for weeks on end, while Fergie, pregnant with Eugenie, went out of control.
….if the wife was at the time of the marriage pregnant by some other person than her husband.