Does Cold Fusion accept WC1A3LL (i.e. without the space)?
If so, it's a case of stripping all spaces, then parsing the postcode, then some sort of character shift along the lines of the following (written in Pascal in this case):-
postcode:=postcode+" "; {adds a space to the end, increasing length by 1}
postcode[length(postcode)]:=postcode[length(postcode)-1];
postcode[length(postcode)-1]:=postcode[length(postcode)-2];
postcode[length(postcode)-2]:=postcode[length(postcode)-3];
The last three lines nudge the last three characters along to recreate the gap.