The best way to Extract Secter section of UK Postcode

Discussion in 'Programming' started by m_wc, Jun 30, 2007.

  1. #1
    Hi,
    Can anybody tell me how and with which regular expression i can extract the sector code from a uk based post code...


    Any regular expression for it?
     
    m_wc, Jun 30, 2007 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    the sector code, according to Royal Mail is simply the numerical part of the 2nd 1/2 of the post code. Given the 2nd half is always 3 characters long (1 number and 2 letters) simply count the 3rd character in from the right.
     
    AstarothSolutions, Jun 30, 2007 IP