Morning..
I worked in the mail industry for years & we always encountered Post code Problems.
You are correct in the defintion of 3 basic postcode types (6,7 & 8 chars long)
The post code is broken down into a 3 or 4 character Postout segment followed by single space then a 3 character Post In segement.
From experience about 25% of your data (dependent on source) is likely to Contain ONLY a post out field (e.g Bristol, BS1) or no Space (e.g Bristol, BS13XX).
For Industry strength Postcode extraction you need to obtain a datafile of valid Postcodes from the Royal mail.
If you need to perform any actions on the data (walksort, mailsort, CBC etc) you will need a Highly advanced program to take into account Posttowns, and Postcode cleaning - we had many in house programs to perform these functions, but ended up using Matchit (which uses DBFs).
Mrf