Socket
Socket
Sign inDemoInstall

youtube-regex

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youtube-regex

The correct Youtube video id regex! Regex done right!


Version published
Weekly downloads
1.8K
increased by3.81%
Maintainers
1
Weekly downloads
 
Created
Source

youtube-regex NPM version Build Status Coveralls regexps org

The correct Youtube video id regex. Regex done right!

Install Nodei.co stats

Install with npm

$ npm install youtube-regex
$ npm test

Online

Usage

var youtubeRegex = require('youtube-regex');

// contains youtube url address
youtubeRegex().test('unicorn youtube.com/watch?v=0EWbonj7f18');
//=> true

// also these will works
youtubeRegex().test('youtube.com/watch?v=0EWbonj7f18');
//=> true
youtubeRegex().test('youtube.com/watch?feature=related&v=0EWbonj7f18');
//=> true
youtubeRegex().test('youtube.com/watch?v=0EWbonj7f18&feature=related');
//=> true
youtubeRegex().test('http://www.youtube.com/watch?v=0EWbonj7f18');
//=> true
youtubeRegex().test('http://www.youtube.com/watch?feature=related&v=0EWbonj7f18');
//=> true

For more use-cases see tests

Authors & Contributors

Charlike Mike Reagent author tips

License MIT license

Copyright (c) 2014 Charlike Mike Reagent, contributors.
Released under the MIT license.

Keywords

FAQs

Package last updated on 18 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc