Regular expression for JMBG.
npm install regex-jmbg --savevar jmbg = require('regex-jmbg');
jmbg().test('1304005111059'); // => true
jmbg().test('3213973392147'); // => false
jmbg().exec('1304005111059');
// => [0] '1304005111059'
// => [1] '13'
// => [2] '04'
// => [3] '005'
// => [4] '11'
// => [5] '105'
// => [6] '9'[0]: full JMBG[1]: day of birth[2]: month of birth[3]: last three digits of the year of birth[4]: political region of birth[5]: unique number of the particular political region[6]: control number
MIT © Ivan Nikolić