regex-oib

1.0.0 • Public • Published

regex-oib

Regular expression for OIB.

Installation

npm install regex-oib --save

Examples

var oib = require('regex-oib');
 
oib().test('12345678901'); // => true
oib().test('HR12345678901'); // => true
oib().test('123456789011'); // => false
 
oib().exec('HR12345678901');
// => [0] 'HR12345678901'
// => [1] '12345678901'
// => [2] '1'

Match groups

  • [0]: full OIB, with leading international symbol (if provided)
  • [1]: full OIB, without leading international symbols
  • [2]: control number

License

MIT © Ivan Nikolić

Readme

Keywords

Package Sidebar

Install

npm i regex-oib

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • niksy