This is a similar question to this previous query.
However, this time I want to split the postcodes up two characters before the end of the string. How do I do this please?
For example, I have postcode data in R that looks like this, having had the central space removed:
Base R, non-regex solution:
substring(postcodes, 1, nchar(postcodes)-2 )