Regular Expressions 101

Community Patterns

Outode

1

Regular Expression
PCRE (PHP <7.3)

/
(\w{1,2}\d{1,2})(?:.+)
/

Description

Capture the outcode portion (first half) of a UK Post Code.

Submitted by Nike Begbaaji - 8 years ago