The new docs.trellix.com features a modernized UI and AI-powered conversational search. Content is currently available in English, with additional languages launching in early November 2026. We hope you enjoy the updated experience.

UK Postcode

Prev Next

Postal codes are alphanumeric codes used in the United Kingdom are known as postcodes (originally postal codes). A full postcode is known as a "postcode unit" and designates an area with a number of addresses or a single major delivery point.

Validator

None

Matched expressions

Regex expressions

Description

Score

\b([G][I][R] ?0[A]{2})\b

Matches an exact string "GIR 0AA"

1

\b[A-Z][0-9]{1,2} ?[0-9][A-Z]{2} ?[0-9][A-Z]{2}

Matches an alphanumeric string of the format ANN NAA NAA or AN NAA NAA

1

\b[A-Z][A-HJ-Y][0-9]{1,2} ?[0-9][A-Z]{2}

Matches an alphanumeric string of the format AAN NAA or AANN NAA (the second character cannot contain I or Z), where space is optional.

1

\b[A-Z][0-9][A-Z] ?[0-9][A-Z]{2}

Matches an alphanumeric string of the format ANA NAA, where space is optional.

1

\b[A-Z][A-HJ-Y][0-9]?[A-Z] ?[0-9][A-Z]{2}

Matches an alphanumeric string of the format AANA NAA (the second character cannot contain I or Z), where space and second digit are optional.

1



Ignored expressions

None