Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocs
Address
en-GB
#postcode
#postal
#uk
#british

UK Postcode

Matches a UK postcode in the standard format (e.g. SW1A 1AA, EC1A 1BB).

UK address formsDelivery validationGeographic targeting
/
/
Test String
5 matches
[…]{1,2}Character class […]Matches any single character listed in this set — repeated between 1 and 2 times · {1,2} — between 1 and 2 times
A-ZA-ZA-Z — range from 'A' to 'Z'
\ddigit\d — digit (0–9)
[…]?Character class […]Matches any single character listed in this set — repeated zero or one time (optional) · ? — zero or one time (optional)
A-ZA-ZA-Z — range from 'A' to 'Z'
\ddigit\d — digit (0–9)
\s?space\s — whitespace (space, tab, newline…) — repeated zero or one time (optional) · ? — zero or one time (optional)
\ddigit\d — digit (0–9)
[…]{2}Character class […]Matches any single character listed in this set — repeated exactly 2 times · {2} — exactly 2 times
A-ZA-ZA-Z — range from 'A' to 'Z'
Pattern: 33 charsInput: 40 chars
100% client-side · private

Valid Examples

  • SW1A 1AA
  • EC1A 1BB
  • W1A 0AX
  • M1 1AE
  • SW1A1AA

Invalid Examples

  • 123 456
  • ABCD 1EF
  • SW1A 1A