Skip to content

Commit

Permalink
Mod Regex for Ooredoo new phone starting with number 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaung Myat Lwin committed Mar 26, 2018
1 parent 4da8162 commit 27e0694
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion myanmar-phonenumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'use strict';
var myanmarPhoneNumber = {
OPERATOR_REGEX: {
ooredoo: /^(09|\+?959)9(7|6)\d{7}$/,
ooredoo: /^(09|\+?959)9(5|7|6)\d{7}$/,
telenor: /^(09|\+?959)7(9|8|7)\d{7}$/,
mpt: /^(09|\+?959)(5\d{6}|4\d{7,8}|2\d{6,8}|3\d{7,8}|6\d{6}|8\d{6}|7\d{7}|9(0|1|9)\d{5,6})$/
},
Expand Down
4 changes: 2 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var assert = require('assert');
var myanmarPhoneNumber = require('../myanmar.phonenumber.js');
var myanmarPhoneNumber = require('../myanmar-phonenumber.js');

describe('Sanitize input: ', function(){

Expand Down Expand Up @@ -36,7 +36,7 @@ describe('Valid Myanmar Phone: ', function(){
describe('Operator names: ', function () {

it('should return Ooredoo', function () {
var opName = myanmarPhoneNumber.getTelecomName('09978412345');
var opName = myanmarPhoneNumber.getTelecomName('09958412345');
assert.equal(opName, 'Ooredoo');
});

Expand Down

0 comments on commit 27e0694

Please sign in to comment.