Skip to content

Regular expression for matching South African Cellphone numbers

License

Notifications You must be signed in to change notification settings

tiaanduplessis/sa-number-regex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sa-number-regex

package version package downloads standard-readme compliant package license make a pull request

Regular expression for matching South African Cellphone numbers

Table of Contents

Install

This project uses node and npm.

$ npm install sa-number-regex
$ # OR
$ yarn add sa-number-regex

Usage

const saNumberRegex = require('sa-number-regex')

console.log(saNumberRegex({exact: true}).test('0749585337')) // true
console.log(saNumberRegex({exact: true}).test('0833597957')) // true
console.log(saNumberRegex({exact: true}).test('0845017368')) // true

The exact argument only match an exact string. Default is global.

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am 'Add some feature' 3.Push to the branch: git push origin my-new-feature
  3. Submit a pull request

License

MIT

About

Regular expression for matching South African Cellphone numbers

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published