mapcode-regex 
Regular expression for matching mapcodes
Install
$ npm install --save mapcode-regex
Usage
var mapcodeRegex = require('mapcode-regex');
mapcodeRegex().test('4J.Q2');
mapcodeRegex().test('Hawaii ZSR.3J');
mapcodeRegex().exec('This is a mapcode FRA 4J.Q2')[0];
'Multiple FRA 4J.Q2 Hawaii ZSR.3J mapcodes'.match(mapcodeRegex());
It's a function so you can create multiple instances. Regexes with the global flag will have the .lastIndex property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for .test().
Tip
You can use clone-regexp to change the flags. In this case maybe remove the global flag.
License
MIT © Sindre Sorhus