UK maternity allowance question.

Na

Hi, I've been in my current job since September 2017 and it will ending July 2018. I have a new job lined up for September so my question is, if I were to get pregnant in the next few months would I be able to claim anything? Been TTC a few months and now worried me having a new job will affect things. I know I might not get pregnant just yet but I'm worried I'll be pregnant and have nothing. Thanks!