Skip to content

kevva/skype-regex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

skype-regex Build Status

Regular expression for matching Skype URLs

Install

$ npm install --save skype-regex

Usage

const skypeRegex = require('skype-regex');

skypeRegex().test('skype:foobar123?call foo bar');
//=> true

skypeRegex({exact: true}).test('skype:foobar123?call foo bar');
//=> false

skypeRegex({exact: true}).test('skype:foobar123?call');
//=> true

'foo skype:foobar123?chat bar callto:foobar123'.match(skypeRegex());
//=> ['skype:foobar123?chat', 'callto:foobar123']

API

skypeRegex(options)

Returns a regex for matching Skype URLs.

options

exact

Type: Boolean
Default: false (Matches any Skype URLs in a string)

Only match an exact string. Useful with RegExp#test to check if a string is a Skype URL.

License

MIT © Kevin Mårtensson

About

Regular expression for matching Skype URLs

Resources

License

Stars

Watchers

Forks

Packages

No packages published