Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

martinvd/dutch-postcode-regex

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dutch-postcode-regex Build Status

Regular expression for matching Dutch postcodes

Install

$ npm install dutch-postcode-regex

Usage

const dutchPostcodeRegex = require('dutch-postcode-regex');

// Contains a postcode
dutchPostcodeRegex().test('foo 33000AB');
//=> true

// Is a postcode
dutchPostcodeRegex({exact: true}).test('bar 2012 ES');
//=> false

'Their postcode is 3121 ar, or was it 3201EB?'.match(dutchPostcodeRegex());
//=> ['3121 ar', '3201EB']

API

dutchPostcodeRegex([options])

Returns a regex for matching Dutch postcodes.

options

exact

Type: boolean
Default: false (Matches any Dutch postcode in a string)

Only match an exact string.
Useful with RegExp#test to check if a string is a Dutch postcode.

License

MIT © Martin van Driel

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.