Document toolboxDocument toolbox

sp046_postcode_patterns

On This Page:

This table contains all the defined part postcode matching regular expressions.


 

Table Definition

Field
Type
Default
Nullable
pattern_nonumber(2) (error)
descriptionvarchar2(30) (error)
patternvarchar2(200) (error)
display_ordernumber(2) (error)
field_idvarchar2(100) (error)

Keys

unique (description) 

primary key (pattern_no) 

foreign key (field_id) references sp900_language_translation (field_id)

Primary Key Referenced From

Column Descriptions

FieldDescription
pattern_no unique identifier for the part postcode pattern
description (Depreciated)text used to describe the pattern in the same site dialogue
pattern regular expression to define a partial postcode e.g.([a-zA-Z]{1,2}[0-9])|([a-zA-Z]{1,2}[1-9][0-9]?)
display_orderthe order in which the gantt client displays the postcode pattern options in the same site dialogue.
field_idkey to language translation for description

 

 


 

Pre-loaded Data

Four default patterns have been preloaded – two for the UK and two for the US: 

Display Name

Pattern

UKDistrict

([a-zA-Z]{1,2}[0-9] )|([a-zA-Z]{1,2}[1-9][0-9]? )

UKSector

([a-zA-Z]{1,2}[0-9] [1-9])|([a-zA-Z]{1,2}[1-9][0-9]? [1-9])

US Zip

[0-9]{5,5}

US Zip + 2

[0-9]{7,7}

The explanation for these patterns is as follows:

Display Name

Meaning of Pattern

UKDistrict

  • 1 or 2 letters (upper or lower case) followed by a single digit (0 to 9) followed by a space; or
  • 1 or 2 letters (upper or lower case) followed by a number from 1 to 99 followed by a space (e.g. "M26 ", "SK7 ")

UKSector

As above, but followed by a single digit (1 to 9) (e.g. "M26 1", "SK7 4").

US Zip

A number in the range 00000 to 99999.

US Zip + 2

A number in the range 0000000 to 9999999.