Community Patterns

Community Library Entry

1

Regular Expression
Created·2016-03-01 15:53
Flavor·PCRE (Legacy)

/
^([a-zA-Z]{0,2})([0-9][0-9]|[0-9]|[a-zA-Z][0-9][a-zA-Z]|[a-zA-Z][0-9][0-9]|[a-zA-Z][0-9])([ ]*)([0-9]{1,2})([a-zA-z][a-zA-z])$
/
Open regex in editor

Description

ID UK Postcodes (not fast but it does work!)

Submitted by anonymous