Better for you than typhoid. Did a doctor prescribe the Cephalexin? And did he know you are pregnant? Then you should be OK. If you have doubts or did not get the prescription from your doctor who knows you are pregnant, ask a doctor or a pharmacist. Don't take any antibiotic or other drug that wasn't prescribed to you. But if that is the case, see a doctor because typhoid is very serious.