UK Postcode Checker

Published on Tue Mar 01 2022

This is an improvement of the very good tH9mQ1/1. It did not pickup on the first two postcodes found here: //http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom

Additional matching regexes for
UK Postcode Checker

UK Postcode Checker

This is an improvement of the very good tH9mQ1/1. It did not pickup on the first two postcodes found here: //http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom

Better version of UK postcode

This UK postcode regex will match all variants of postcode formats including inner London postcodes (eg SW1A), with optional space (both AL11XP and AL1 1XP are valid) It will reject any postcode that does not specify a valid postcode area. Each part of the postcode is also captured into a capture group as follows: group 1: POSTCODE AREA group 2: POSTCODE DISTRICT group 3: POSTCODE SECTOR group 4: POSTCODE UNIT

Thorough UK Postcode Validator with In/Out code capture groups

A more thorough UK postcode validator tested against all UK postcodes on a regular basis, but excluding the special GIRO postcode case out of personal preference. Additionally has capture groups for the In-code and Out-code sections. Requires case insensitive matching.

REGEX Código Postal Pt

Expressão regular para o código postal (postcode) portugês

find all link(<a>) tags expect your links in href attribute

<a href="yourlink.com">YourLink</a> - not found <a href="anotherlink.com">AnotherLink</a> - found

search script tags

found if is content src atributes

Wikipedia anchor

Match Wikipedia anchor dot-instead-of-percent encoding string.replace(/((?:\.[a-f0-9]{2}){2})/ig, function(match) { return decodeURIComponent(match.replace(/\./g, '%')) });

match valid JSON

Matches any valid JSON object, matches recursively. Passes all JSON test cases I found.

URL regexp

A quite neat regular expression for URLs, e-mails..., I found on Matthew O'Riordan's blog.

Common log format datetime

Parses the common log format into component elements. According to wikipedia, common log is strftime format %d/%b/%Y:%H:%M:%S %z