Comparing version 1.0.3 to 1.0.4
@@ -10,3 +10,3 @@ 'use strict'; | ||
module.exports = function () { | ||
return /(^|\s)((?:(?:\w+:)?\/\/)|(www.))+(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)*(?=\s|$)/gi; | ||
return /(?:^|\s)(["'])?(?:(?:(?:(?:https?|ftp|\w):)?\/\/)|(?:www.))(?:\S+(?::\S*)?@)?(?:(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?\1/ig; | ||
}; |
{ | ||
"name": "url-regex", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Regular expression for matching URLs", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -5,2 +5,4 @@ # url-regex [![Build Status](https://travis-ci.org/kevva/url-regex.svg?branch=master)](https://travis-ci.org/kevva/url-regex) | ||
Based on this [gist](https://gist.github.com/dperini/729294) by Diego Perini. | ||
## Install | ||
@@ -29,2 +31,2 @@ | ||
MIT © [Kevin Mårtensson](http://kevinmartensson.com) | ||
MIT © [Diego Perini](https://gist.github.com/dperini) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31
1705