![]() ![]() The regular expressions in this section should not be used. If you don't care about the bad regex and just want to skip to the answer, scroll down to the Answer section. ![]() For this, use an appropriate API! See Ben's answer for more info.Does not ensure that a postcode legitimately exists.My answer (and regular expressions in general): I'll outline some of these issues below and provide a revised regular expression that actually works. Unfortunately, many of the answers here are based on this incorrect pattern. I discovered that the UK Government's regex pattern is incorrect and fails to properly validate some postcodes. I recently posted an answer to this question on UK postcodes for the R language. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |