JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 426049
  • Score
    100M100P100Q178367F
  • License MIT

Regular expression for matching URLs

Package Exports

  • url-regex

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (url-regex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

url-regex Build Status

Regular expression for matching URLs

Based on this gist by Diego Perini.

Install

$ npm install --save url-regex

Usage

var urlRegex = require('url-regex');

urlRegex().test('github.com foo bar');
//=> true

urlRegex({exact: true}).test('github.com foo bar');
//=> false

urlRegex({exact: true}).test('github.com');
//=> true

'foo github.com bar google.com'.match(urlRegex());
//=> ['github.com', 'google.com']

License

MIT © Diego Perini