I am working with UK postcodes and need to strip out the area and district
automatically

The post code comes in following

A1 2BC
D34 5EF
GH6 7IJ
KL8M 9NQ


The part before the space contains the area and district.

The first is area which can be a single letter or double letter. The second
bit is usually a single number, however in london it can be a number and
letter.


So the results would be as follows.

A
D
GH
KL

How can I extract this automatically?

Many thanks