How can I get the initial letters from a postcode in javascript? I just want the letters before the numbers start, like this:
E.g - 'L159XU' would return 'L'
E.g - 'TW136PZ' would return 'TW'
I was originally doing this:
const letters = postcode.substring(0, 2);
But some only have one letter, while others have two. Is there a way to do this?