Skip to content

Commit

Permalink
Fix handling of UK post codes to be much more specific
Browse files Browse the repository at this point in the history
We no longer misidentify some one-word names (fern, cru) as post codes
  • Loading branch information
autarch committed Sep 2, 2012
1 parent f7bae49 commit c623774
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/VegGuide/Controller/Site.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -107,8 +107,17 @@ sub clone_entry_form : Local {
| |
(?: # UK (?: # UK
^ ^
[a-z]{1,2}[0-9r][0-9a-z]? [a-z][0-9]\ [0-9][a-z]{2}
(?:\s+[0-9][abd-klmp-uwxyz]{2})? |
[a-z][0-9]{2}\ [0-9][a-z]{2}
|
[a-z]{2}[0-9]\ [0-9][a-z]{2}
|
[a-z]{2}[0-9]{2}\ [0-9][a-z]{2}
|
[a-z][0-9][a-z]\ [0-9][a-z]{2}
|
[a-z]{2}[0-9][a-z]\ [0-9][a-z]{2}
$ $
) )
# | # |
Expand Down

0 comments on commit c623774

Please sign in to comment.